home *** CD-ROM | disk | FTP | other *** search
Text File | 1999-04-12 | 106.3 KB | 3,329 lines | [TEXT/MPS ] |
- /*
- File: FireWire.h
-
- Contains: Definitions and interfaces for FireWire driver family.
-
- Version: 1.0
-
- Copyright: © 1996-1999 by Apple Computer, Inc., all rights reserved.
-
- File Ownership:
-
- DRI: Eric Anderson
-
- Other Contact:
-
- Technology: FireWire
-
- Writers:
-
- (EA) Eric Anderson (ewa)
- (DCB) Clinton Bauder
- (ES) Erik Staats
- (jkl) Jay Lloyd
-
- Change History (most recent first):
-
- <FW127> 3/8/99 EA Added kFWAddressPhysical flag.
- <FW126> 1/21/99 DCB Add FWWaitForDeviceRePlug.
- <FW125> 1/17/99 EA Added FWCommandObjectID to FWClientPowerNotifyParamsStruct.
- <FW124> 1/3/99 EA Added speed to FWClientAsynchRequestParamsStruct so that clients
- can learn and control the speeds of request/response packets, if
- needed (for example, an SBP-2 target emulator). Also added
- kFWAsynchOverrideSpeed constant for asynch transfer flags.
- Added prototypes of set/get speed functions.
- <FW123> 1/3/99 EA Put ; after new enum. D'oh.
- <FW122> 1/3/99 EA Added notificationEvent constants for cable power events.
- <FW121> 1/3/99 EA Added stuff for cable power management.
- <FW120> 12/7/98 EA Added prototype for FWInstallNewFWIM for CardBus.
- <FW119> 9/20/98 EA Added SBP-2 API selectors and command object types.
- <FW118> 9/1/98 EA Added FWAllocatePhysicalAddressSpace prototype.
- <FW117> 8/24/98 EA Added FWGetCycleTime prototype, and FWIM dispatch table entry.
- Changed fwimPollInterruptsProcPtr to fwimPollInterruptsProc.
- <FW116> 8/2/98 EA Added selectors for SBP-2 notifications.
- <FW115> 7/24/98 jkl Changed gestalt hasPorts selector from 0 to 1. This selector is
- for bit 0 in the FireWire gestalt attributes. Also updated
- version for FSL.
- <FW114> 7/24/98 DCB Add some comments regarding SetFWIMState.
- <FW113> 7/17/98 DCB Added a new FWIM command - FWIMSetFWIMState for sleeping or
- quiescing FWIMs.
- <FW112> 7/5/98 EA Add param to FWIMSetCSRROMParamsStruct so that the CSR ROM can't
- be read while it is being updated. Also added FWIM Features
- flags and FWIMInitializeParams for feature flags and CSR ROM Map
- length. Add more 1.1 FWIM API declarations.
- <FW111> 7/1/98 EA Add services for OpenHCI FWIMs.
- <FW110> 6/9/98 jkl Corrected PHY packet tCode to 0x0E, or 14, not 13.
- <FW109> 6/5/98 jkl Added PHY packet transmit tcode define.
- <FW108> 6/5/98 jkl Corrected AckBusy defines.
- <FW107> 4/21/98 DCB Adding some more stuff for self-id packets 1-3.
- <FW106> 3/9/98 DCB Fleshing out self-id packet definitions.
- <105> 2/11/98 DCB Adding FWIMEnableVMUserCode and FWIMDisableVMUserCode. This file
- needs to be changed into a .i file so we can keep future APIs in
- here where they belong without making life difficult for DDK
- releases.
- <104> 1/15/98 jkl Update for new interfaces.
- <103> 11/14/97 jkl Add defines for FireWire Gestalt.
- <FW102> 3/14/97 ES Changed error code values to one's we've been allocated.
- <FW101> 3/3/97 ES Added DCLTimeStamp.
- <FW100> 2/20/97 ES Rearranged FWClientAsynchRequestParams, removed buffer, and
- added receiveBuffer, transmitBuffer, and responseCode.
- <FW99> 2/14/97 ES Added FWIMFinalize and FWIMPollInterrupts to FWIM plug in
- dispatch table.
- <FW98> 2/14/97 ES Moved transfer buffer packet size into the transfer buffer DCL
- and removed the set packet size DCL.
- <FW97> 2/14/97 ES Added procedure prototype for FWModifyDCLList and added some
- defs for DCL opcode flags.
- <FW96> 2/6/97 ES Removed some private fields from FWClientInterfaceParams.
- <FW95> 2/6/97 ES Removed some private fields from FWIMCommandParams record. Added
- procedure prototypes for registering protocol drivers.
- <FW94> 2/4/97 ES Added private and initial unit address space allocation options
- to FWAllocateAddressSpace. Added defs for initial memory,
- private, and initial unit address spaces. Added support for
- offset entries to FWCSRROMCreateEntry.
- <FW93> 1/27/97 ES Changed protocol driver file type to 'ndrv'. Fixes bug #1621930.
- <FW92> 1/16/97 ES Changed CSR ROM search key bit constant names. Added procedure
- prototype for FWCSRROMDisposeEntry.
- <FW91> 1/9/97 ES Added includes so this file can compile by itself.
- <FW90> 1/8/97 ES Changed defs for kInvalidCSRROMEntryType and
- kImmediateCSRROMEntryType. Added generation and sourceID fields
- to FWClientAsynchRequestParams. Added procedure prototypes for
- FWGetFWDeviceIDFromFWReferenceID, FWFindFWDeviceFromNodeID, and
- FWGetUnitCSRROMEntryID.
- <FW89> 1/1/97 ES Added FWUpdateDCLList. Changed the DCL notification interface.
- Changed DCL event defs to kFWDCL<Event>Event.
- <FW88> 12/27/96 ES Added a bunch of procedure prototypes.
- <FW87> 12/27/96 ES Changed a bunch of "FWDriver"s to "FWClient"s and added support
- for protocol drivers, clients, and units.
- <FW86> 12/26/96 ES Added support for DCL program stop and release procs.
- <FW85> 12/16/96 ES Changed to work with new read/write/lock request/complete
- processing mechanism.
- <FW84> 12/26/96 ES Consolidated some parameters in asynch FWIM commands and
- processing.
- <FW83> 12/22/96 ES Changed IsochPortAction to IsochPortControl.
- <FW82> 12/12/96 ES Took transmit buffer out of FWIMProcessAsynchParams record.
- <FW81> 12/11/96 ES Removed some fields from FWIMProcessAsynchParams. Changed
- FWIMProcess routines to return OSStatus.
- <FW80> 12/10/96 ES Added defs for isochronous channel force stop notification.
- <FW79> 12/6/96 ES Changed FWIMInstallParams to FWIMInitializeParams and changed
- some of the fields in FWIMInitializeParams.
- FWIMAsynchCommandParams were changed to supply the split
- transaction timeout.
- <FW78> 12/6/96 ES Added FWClippedSubtract.
- <FW77> 12/3/96 ES Added kFWFixedAddress flag to FWAllocateAddressSpace.
- <FW76> 11/27/96 ES Added retryExceededErr.
- <FW75> 11/26/96 ES Added procedure prototype for FWStartDCLProgram.
- <FW74> 11/11/96 ES Added GetUniqueID FWIM command and FWDeallocateAddressSpace.
- <FW73> 11/5/96 ES Added stuff for FireWire deferred tasks.
- <FW72> 10/18/96 ES Added kDCLSendBufferOp and kDCLSetPacketSizeOp. Changed the
- definition of DCL compiler notification procs. Added a number of
- DCL procedure prototypes.
- <FW71> 10/16/96 ES Added stuff for bus management notification. Also, added
- disconnectedErr.
- <FW70> 10/4/96 ES Added procedure prototype for FWCallDCLCallProc.
- <FW69> 10/4/96 ES Replaced DCLSetPacketAttributes command with DCLSetTagSyncBits
- command. Added DCLSetPacketWithHeaderStart command.
- <FW68> 10/3/96 ES Added FWIMPluginDispatchTable stuff.
- <FW67> 10/3/96 ES Removed GetTopologyMap FWIM command. Made FWGetTopologyMap
- immediate. Added FWProcessSelfIDs.
- <FW66> 9/27/96 ES Added procedure prototypes for routines to set and get driver
- interface procs and removed driver interface table from
- FWRegisterDriver.
- <FW65> 9/26/96 ES Added kFWAsynchFailOnBusReset.
- <FW64> 9/26/96 ES Added separateBusErr.
- <FW63> 9/25/96 ES Added kFWAsynchAbsoluteAddress.
- <FW62> 9/25/96 ES Added FWIM asynchronous transaction response commands. Changed
- FWIMProcessAsynchParams record.
- <FW61> 9/20/96 ES Added kFWAsynchDisableAddressIncrement to allow disabling of
- automatic address incrementing on asynchronous transfers.
- <FW60> 9/16/96 ES Changed FWIM and FireWire driver interfaces to return command
- acceptance.
- <FW59> 9/16/96 ES Added response code field to FWIMProcessAsynchRequestParams.
- Took out some unused constants and data structures.
- <FW58> 9/16/96 ES Fixed defs for kFWIsochTCode and kFWIsochTag.
- <FW57> 9/11/96 ES Changed maxRetries for FCP commands to be UInt32 instead of
- SInt32.
- <FW56> 9/11/96 ES Added kFWMaxNodeHops, kFWTopologyMapMaxSelfIDs, and FWSpeedMap
- defs. Added speed parameter to FWIMAsynchCommandParams.
- <FW55> 9/5/96 ES Added fwDriverAsynchRequestParams to FWIMProcessAsynchParams
- record and changed completionProcData in FWIMProcessParams
- record to a UInt32.
- <FW54> 9/4/96 ES Added procedure prototype for FWDeallocateIsochronousChannelID.
- <FW53> 9/3/96 ES Added driver reset notification.
- <FW52> 9/3/96 ES Added kFWIMSendLinkOnPacket.
- <FW51> 8/30/96 ES Added a bunch of stuff for isochronous resource management.
- <FW50> 8/29/96 ES Added set and clear contender bit FWIM commands.
- <FW49> 8/29/96 ES Changed FWRegisterDriver to take driver interface proc table.
- <FW48> 8/28/96 ES Added procedure prototypes for FWProcessLockRequest. Added def
- for kFWDriverLock. Added extendedTCode to some asynch command
- parameter records.
- <FW47> 8/28/96 ES Added kFWAsynchOverrideMaxPayload to asynch transfer flags.
- <FW46> 8/26/96 ES Put back kInvalidFWGenerationNumber.
- <FW45> 8/26/96 ES Changed to new command object interface.
- <FW44> 8/26/96 ES Added local node ID to FWIMGetTopologyMapParams record, added
- FWGetLocalFWReferenceIDFromFWReferenceID, and changed some
- constant names.
- <FW43> 8/16/96 ES Added immediate modes. Changed FWAllocateIsochPort to take
- FWAllocateIsochPortParams.
- <FW42> 8/15/96 ES Added defs for queueing for FW driver commands. Added procedure
- prototypes for dynamically changing destination of DCL jump
- commands. Added defs for making isoch channel and port routines
- asynchronous.
- <FW41> 8/8/96 ES Added FWTranslateDCLProgram.
- <FW40> 8/2/96 ES Replaced IsochBufferChains with DCLPrograms.
- <FW39> 7/31/96 ES Changed to implement new isochronous buffering architecture.
- <FW38> 7/8/96 ES Added support for isochronous transmission. Added FWClippedAdd.
- Added IRM allocation option to FWAllocateIsochronousChannelID.
- <FW37> 6/24/96 ES Added FWCompareAndSwap.
- <FW36> 6/20/96 ES Made this look more like a .i generated interface.
- <FW35> 6/14/96 ES Added FWUnregisterDriver.
- <FW34> 5/31/96 ES Took out expert notification stuff and added some virtual device
- defs.
- <FW33> 4/29/96 ES Cleaned up FWCSRROMCreateEntryID procedure prototype.
- <FW32> 4/17/96 ES Changed and added some procedure prototypes.
- <FW31> 4/15/96 ES Got rid of stuff for FWDriverInstall and added stuff for
- FWRegisterDriver.
- <FW30> 4/5/96 ES Added a bunch of CSRROM service procedure prototypes.
- <FW29> 3/29/96 ES Moved some of the virtual device stuff here from the private
- header.
- <FW28> 3/25/96 ES Added support for asynch request packet handling by drivers.
- <FW27> 3/12/96 ES Added FWVDeviceID.
- <FW26> 3/8/96 ES Add stuff for creating CSR configuration ROM entries on the
- local host.
- <FW25> 3/7/96 ES Changed stuff with address spaces and FWIM processing requests.
- <FW24> 2/22/96 ES Added stuff for FWIsochResourceManagerID.
- <FW23> 2/21/96 ES Added fwimData to IsochChannelBufferStruct, changed fwimData to
- a UInt32 in IsochBufferChainStruct, and added isochChannelID to
- FWDriverIsochPortParamsStruct.
- <FW22> 2/21/96 ES Added a bunch of atomic operations.
- <FW21> 2/16/96 ES Added procedure prototypes for FWAllocateIsochBufferChainID and
- FWDeallocateIsochBufferChainID and changed some stuff for
- isochronous ports.
- <FW20> 2/9/96 ES Added stuff for FWGetTopologyMap and for synchronizing the
- services queue.
- <FW19> 2/7/96 ES Added kInvalidNodeID.
- <FW18> 2/7/96 ES Added FWThresholdAdd and FWThresholdSubtract and a whole bunch
- of other stuff for doing lock transactions.
- <FW17> 2/2/96 ES Added stuff for disabling the FWIM command queue and specifying
- the bus generation number in FireWire asynch commands.
- <FW16> 2/1/96 ES Added kFWIMCommandPriorityFlag, kFWInterfacePriorityFlag, and
- busReconfiguredErr.
- <FW15> 1/30/96 ES Added stuff for doing bus resets.
- <FW14> 1/30/96 ES Defined kFWRequestWaiting and changed pNextFWInterfaceParams in
- FWInterfaceParamsStruct from FWInterfaceParamsPtr * to
- FWInterfaceParamsPtr.
- <FW13> 1/26/96 ES Added FWSetMaxPayloadSize and other maxPayload stuff.
- <FW12> 1/24/96 ES Added responseHandler and settable timeout to FCP command
- params.
- <FW11> 1/18/96 ES Added function prototypes for task and software interrupt
- services. Changed kMaxSelfIDPacketsPerNode to 9.
- <FW10> 1/12/96 ES Added FWReleaseIsochronousChannel and
- FWReleaseLocalIsochronousPort. Changed kFWInvalidFWIMCommandID
- to kInvalidFWIMCommandID.
- <FW9> 1/12/96 ES Added flags to FWIMCommandParams.
- <FW8> 1/11/96 ES Changed request and interface to command in most of the FWIM
- stuff.
- <FW7> 1/11/96 ES Changed calling parameters for FWCommandIsComplete and changed
- to FWIMCommandIsComplete. Added stuff for FWIMCommandIDs.
- <FW6> 1/10/96 ES Added prototype for FWProcessBusReset.
- <FW5> 1/9/96 ES Added FWProcessWriteRequest and removed kFWWriteNotify.
- <FW4> 1/9/96 ES Really got rid of kFWFWIMRequestCompleteNotify.
- <FW3> 1/9/96 ES Added FWCommandIsComplete. Removed kFWFWIMRequestCompleteNotify.
- <FW2> 1/6/96 ES Fill in contains and written by fields.
- <FW1> 1/6/96 ES first checked in
-
- */
-
- #ifndef __FIREWIRE__
- #define __FIREWIRE__
-
- #ifndef __TYPES__
- #include <Types.h>
- #endif
-
- #ifndef __DRIVERSERVICES__
- #include <DriverServices.h>
- #endif
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- #if PRAGMA_IMPORT_SUPPORTED
- #pragma import on
- #endif
-
- #if PRAGMA_ALIGN_SUPPORTED
- #pragma options align=mac68k
- #endif
-
-
- // Generic bit defs.
-
- enum
- {
- kBit0 = (1 << 0),
- kBit1 = (1 << 1),
- kBit2 = (1 << 2),
- kBit3 = (1 << 3),
- kBit4 = (1 << 4),
- kBit5 = (1 << 5),
- kBit6 = (1 << 6),
- kBit7 = (1 << 7),
- kBit8 = (1 << 8),
- kBit9 = (1 << 9),
- kBit10 = (1 << 10),
- kBit11 = (1 << 11),
- kBit12 = (1 << 12),
- kBit13 = (1 << 13),
- kBit14 = (1 << 14),
- kBit15 = (1 << 15),
- kBit16 = (1 << 16),
- kBit17 = (1 << 17),
- kBit18 = (1 << 18),
- kBit19 = (1 << 19),
- kBit20 = (1 << 20),
- kBit21 = (1 << 21),
- kBit22 = (1 << 22),
- kBit23 = (1 << 23),
- kBit24 = (1 << 24),
- kBit25 = (1 << 25),
- kBit26 = (1 << 26),
- kBit27 = (1 << 27),
- kBit28 = (1 << 28),
- kBit29 = (1 << 29),
- kBit30 = (1 << 30),
- kBit31 = (1 << 31)
- };
-
- #define BitRange(start, end) \
- ( \
- ((((UInt32) 0xFFFFFFFF) << (31 - (end))) >> \
- ((31 - (end)) + (start))) << \
- (start) \
- )
-
- #define BitRangePhase(start, end) \
- (start)
-
-
- ////////////////////////////////////////////////////////////////////////////////
- //
- // Standard FireWire defs.
- //
-
- // FireWire bit defs.
-
- enum
- {
- kFWBit0 = (1 << 31),
- kFWBit1 = (1 << 30),
- kFWBit2 = (1 << 29),
- kFWBit3 = (1 << 28),
- kFWBit4 = (1 << 27),
- kFWBit5 = (1 << 26),
- kFWBit6 = (1 << 25),
- kFWBit7 = (1 << 24),
- kFWBit8 = (1 << 23),
- kFWBit9 = (1 << 22),
- kFWBit10 = (1 << 21),
- kFWBit11 = (1 << 20),
- kFWBit12 = (1 << 19),
- kFWBit13 = (1 << 18),
- kFWBit14 = (1 << 17),
- kFWBit15 = (1 << 16),
- kFWBit16 = (1 << 15),
- kFWBit17 = (1 << 14),
- kFWBit18 = (1 << 13),
- kFWBit19 = (1 << 12),
- kFWBit20 = (1 << 11),
- kFWBit21 = (1 << 10),
- kFWBit22 = (1 << 9),
- kFWBit23 = (1 << 8),
- kFWBit24 = (1 << 7),
- kFWBit25 = (1 << 6),
- kFWBit26 = (1 << 5),
- kFWBit27 = (1 << 4),
- kFWBit28 = (1 << 3),
- kFWBit29 = (1 << 2),
- kFWBit30 = (1 << 1),
- kFWBit31 = (1 << 0)
- };
-
- #define FWBitRange(start, end) \
- ( \
- ((((UInt32) 0xFFFFFFFF) << (start)) >> \
- ((start) + (31 - (end)))) << \
- (31 - (end)) \
- )
-
- #define FWBitRangePhase(start, end) \
- (31 - end)
-
-
- /*zzz Put in IEEE1212.h */
- ////////////////////////////////////////////////////////////////////////////////
- //
- // Define some CSR stuff.
- //
-
- // CSR bit defs.
-
- enum
- {
- kCSRBit0 = (1 << 31),
- kCSRBit1 = (1 << 30),
- kCSRBit2 = (1 << 29),
- kCSRBit3 = (1 << 28),
- kCSRBit4 = (1 << 27),
- kCSRBit5 = (1 << 26),
- kCSRBit6 = (1 << 25),
- kCSRBit7 = (1 << 24),
- kCSRBit8 = (1 << 23),
- kCSRBit9 = (1 << 22),
- kCSRBit10 = (1 << 21),
- kCSRBit11 = (1 << 20),
- kCSRBit12 = (1 << 19),
- kCSRBit13 = (1 << 18),
- kCSRBit14 = (1 << 17),
- kCSRBit15 = (1 << 16),
- kCSRBit16 = (1 << 15),
- kCSRBit17 = (1 << 14),
- kCSRBit18 = (1 << 13),
- kCSRBit19 = (1 << 12),
- kCSRBit20 = (1 << 11),
- kCSRBit21 = (1 << 10),
- kCSRBit22 = (1 << 9),
- kCSRBit23 = (1 << 8),
- kCSRBit24 = (1 << 7),
- kCSRBit25 = (1 << 6),
- kCSRBit26 = (1 << 5),
- kCSRBit27 = (1 << 4),
- kCSRBit28 = (1 << 3),
- kCSRBit29 = (1 << 2),
- kCSRBit30 = (1 << 1),
- kCSRBit31 = (1 << 0)
- };
-
- #define CSRBitRange(start, end) \
- ( \
- ((((UInt32) 0xFFFFFFFF) << (start)) >> \
- ((start) + (31 - (end)))) << \
- (31 - (end)) \
- )
-
- #define CSRBitRangePhase(start, end) \
- (31 - end)
-
- // Core CSR registers.
-
- enum
- {
- kCSRStateUnitDepend = CSRBitRange (0, 15),
- kCSRStateUnitDependPhase = CSRBitRangePhase (0, 15),
-
- kCSRStateBusDepend = CSRBitRange (16, 23),
- kCSRStateBusDependPhase = CSRBitRangePhase (16, 23),
-
- kCSRStateLost = kCSRBit24,
- kCSRStateDReq = kCSRBit25,
- kCSRStateELog = kCSRBit27,
- kCSRStateAtn = kCSRBit28,
- kCSRStateOff = kCSRBit29,
-
- kCSRStateState = CSRBitRange (30, 31),
- kCSRStateStatePhase = CSRBitRangePhase (30, 31),
- kCSRStateStateRunning = 0,
- kCSRStateStateInitializing = 1,
- kCSRStateStateTesting = 2,
- kCSRStateStateDead = 3
- };
-
- // Key values.
-
- enum
- {
- kCSRTextualDescriptorKey = 0x01,
- kCSRBusDependentInfoKey = 0x02,
- kCSRModuleVendorIDKey = 0x03,
- kCSRModuleHwVersionKey = 0x04,
- kCSRModuleSpecIdKey = 0x05,
- kCSRModuleSwVersionKey = 0x06,
- kCSRModuleDependentInfoKey = 0x07,
- kCSRNodeVendorIdKey = 0x08,
- kCSRNodeHwVersionKey = 0x09,
- kCSRNodeSpecIdKey = 0x0A,
- kCSRNodeSwVersionKey = 0x0B,
- kCSRNodeCapabilitiesKey = 0x0C,
- kCSRNodeUniqueIdKey = 0x0D,
- kCSRNodeUnitsExtentKey = 0x0E,
- kCSRNodeMemoryExtentKey = 0x0F,
- kCSRNodeDependentInfoKey = 0x10,
- kCSRUnitDirectoryKey = 0x11,
- kCSRUnitSpecIdKey = 0x12,
- kCSRUnitSwVersionKey = 0x13,
- kCSRUnitDependentInfoKey = 0x14,
- kCSRUnitLocationKey = 0x15,
- kCSRUnitPollMaskKey = 0x16
- };
-
-
- // Key value bits for searching.
-
- enum
- {
- kCSREveryKey = 0xFFFFFFFF,
-
- kCSRTextualDescriptorKeyLoBit = (1 << kCSRTextualDescriptorKey),
- kCSRTextualDescriptorKeyHiBit = 0,
- kCSRBusDependentInfoKeyLoBit = (1 << kCSRBusDependentInfoKey),
- kCSRBusDependentInfoKeyHiBit = 0,
- kCSRModuleVendorIDKeyLoBit = (1 << kCSRModuleVendorIDKey),
- kCSRModuleVendorIDKeyHiBit = 0,
- kCSRModuleHwVersionKeyLoBit = (1 << kCSRModuleHwVersionKey),
- kCSRModuleHwVersionKeyHiBit = 0,
- kCSRModuleSpecIdKeyLoBit = (1 << kCSRModuleSpecIdKey),
- kCSRModuleSpecIdKeyHiBit = 0,
- kCSRModuleSwVersionKeyLoBit = (1 << kCSRModuleSwVersionKey),
- kCSRModuleSwVersionKeyHiBit = 0,
- kCSRModuleDependentInfoKeyLoBit = (1 << kCSRModuleDependentInfoKey),
- kCSRModuleDependentInfoKeyHiBit = 0,
- kCSRNodeVendorIdKeyLoBit = (1 << kCSRNodeVendorIdKey),
- kCSRNodeVendorIdKeyHiBit = 0,
- kCSRNodeHwVersionKeyLoBit = (1 << kCSRNodeHwVersionKey),
- kCSRNodeHwVersionKeyHiBit = 0,
- kCSRNodeSpecIdKeyLoBit = (1 << kCSRNodeSpecIdKey),
- kCSRNodeSpecIdKeyHiBit = 0,
- kCSRNodeSwVersionKeyLoBit = (1 << kCSRNodeSwVersionKey),
- kCSRNodeSwVersionKeyHiBit = 0,
- kCSRNodeCapabilitiesKeyLoBit = (1 << kCSRNodeCapabilitiesKey),
- kCSRNodeCapabilitiesKeyHiBit = 0,
- kCSRNodeUniqueIdKeyLoBit = (1 << kCSRNodeUniqueIdKey),
- kCSRNodeUniqueIdKeyHiBit = 0,
- kCSRNodeUnitsExtentKeyLoBit = (1 << kCSRNodeUnitsExtentKey),
- kCSRNodeUnitsExtentKeyHiBit = 0,
- kCSRNodeMemoryExtentKeyLoBit = (1 << kCSRNodeMemoryExtentKey),
- kCSRNodeMemoryExtentKeyHiBit = 0,
- kCSRNodeDependentInfoKeyLoBit = (1 << kCSRNodeDependentInfoKey),
- kCSRNodeDependentInfoKeyHiBit = 0,
- kCSRUnitDirectoryKeyLoBit = (1 << kCSRUnitDirectoryKey),
- kCSRUnitDirectoryKeyHiBit = 0,
- kCSRUnitSpecIdKeyLoBit = (1 << kCSRUnitSpecIdKey),
- kCSRUnitSpecIdKeyHiBit = 0,
- kCSRUnitSwVersionKeyLoBit = (1 << kCSRUnitSwVersionKey),
- kCSRUnitSwVersionKeyHiBit = 0,
- kCSRUnitDependentInfoKeyLoBit = (1 << kCSRUnitDependentInfoKey),
- kCSRUnitDependentInfoKeyHiBit = 0,
- kCSRUnitLocationKeyLoBit = (1 << kCSRUnitLocationKey),
- kCSRUnitLocationKeyHiBit = 0,
- kCSRUnitPollMaskKeyLoBit = (1 << kCSRUnitPollMaskKey),
- kCSRUnitPollMaskKeyHiBit = 0
- };
-
-
- // Key types.
-
- enum
- {
- kCSRImmediateKeyType = 0,
- kCSROffsetKeyType = 1,
- kCSRLeafKeyType = 2,
- kCSRDirectoryKeyType = 3
- };
-
-
- // Key type bits for searching.
-
- enum
- {
- kCSREveryKeyType = 0xFFFFFFFF,
-
- kCSRImmediateKeyTypeBit = (1 << kCSRImmediateKeyType),
- kCSROffsetKeyTypeBit = (1 << kCSROffsetKeyType),
- kCSRLeafKeyTypeBit = (1 << kCSRLeafKeyType),
- kCSRDirectoryKeyTypeBit = (1 << kCSRDirectoryKeyType)
- };
-
- // CSR ROM entry bit locations.
-
- enum
- {
- kCSRBusInfoBlockLength = CSRBitRange (0, 7),
- kCSRBusInfoBlockLengthPhase = CSRBitRangePhase (0, 7),
-
- kCSRROMCRCLength = CSRBitRange (8, 15),
- kCSRROMCRCLengthPhase = CSRBitRangePhase (8, 15),
-
- kCSRROMCRCValue = CSRBitRange (16, 31),
- kCSRROMCRCValuePhase = CSRBitRangePhase (16, 31),
-
- kCSREntryKeyType = CSRBitRange (0, 1),
- kCSREntryKeyTypePhase = CSRBitRangePhase (0, 1),
-
- kCSREntryKeyValue = CSRBitRange (2, 7),
- kCSREntryKeyValuePhase = CSRBitRangePhase (2, 7),
-
- kCSREntryValue = CSRBitRange (8, 31),
- kCSREntryValuePhase = CSRBitRangePhase (8, 31),
-
- kCSRLeafDirLength = CSRBitRange (0, 15),
- kCSRLeafDirLengthPhase = CSRBitRangePhase (0, 15),
-
- kCSRLeafDirCRC = CSRBitRange (16, 31),
- kCSRLeafDirCRCPhase = CSRBitRangePhase (16, 31)
- };
-
- // CSR 64-bit fixed address defs.
-
- enum
- {
- kCSRNodeID = CSRBitRange (0, 15),
- kCSRNodeIDPhase = CSRBitRangePhase (0, 15),
-
- kCSRInitialMemorySpaceBaseAddressHi
- = 0x00000000,
- kCSRInitialMemorySpaceBaseAddressLo
- = 0x00000000,
-
- kCSRPrivateSpaceBaseAddressHi
- = 0x0000FFFF,
- kCSRPrivateSpaceBaseAddressLo
- = 0xE0000000,
-
- kCSRRegisterSpaceBaseAddressHi
- = 0x0000FFFF,
- kCSRRegisterSpaceBaseAddressLo
- = 0xF0000000,
-
- kCSRCoreRegistersBaseAddress
- = kCSRRegisterSpaceBaseAddressLo,
- kCSRStateClearAddress = kCSRCoreRegistersBaseAddress + 0x0000,
- kCSRStateSetAddress = kCSRCoreRegistersBaseAddress + 0x0004,
- kCSRNodeIDsAddress = kCSRCoreRegistersBaseAddress + 0x0008,
- kCSRResetStartAddress = kCSRCoreRegistersBaseAddress + 0x000C,
- kCSRIndirectAddressAddress = kCSRCoreRegistersBaseAddress + 0x0010,
- kCSRIndirectDataAddress = kCSRCoreRegistersBaseAddress + 0x0014,
- kCSRSplitTimeoutHiAddress = kCSRCoreRegistersBaseAddress + 0x0018,
- kCSRSplitTimeoutLoAddress = kCSRCoreRegistersBaseAddress + 0x001C,
- kCSRArgumentHiAddress = kCSRCoreRegistersBaseAddress + 0x0020,
- kCSRArgumentLoAddress = kCSRCoreRegistersBaseAddress + 0x0024,
- kCSRTestStartAddress = kCSRCoreRegistersBaseAddress + 0x0028,
- kCSRTestStatusAddress = kCSRCoreRegistersBaseAddress + 0x002C,
- kCSRUnitsBaseHiAddress = kCSRCoreRegistersBaseAddress + 0x0030,
- kCSRUnitsBaseLoAddress = kCSRCoreRegistersBaseAddress + 0x0034,
- kCSRUnitsBoundHiAddress = kCSRCoreRegistersBaseAddress + 0x0038,
- kCSRUnitsBoundLoAddress = kCSRCoreRegistersBaseAddress + 0x003C,
- kCSRMemoryBaseHiAddress = kCSRCoreRegistersBaseAddress + 0x0040,
- kCSRMemoryBaseLoAddress = kCSRCoreRegistersBaseAddress + 0x0044,
- kCSRMemoryBoundHiAddress = kCSRCoreRegistersBaseAddress + 0x0048,
- kCSRMemoryBoundLoAddress = kCSRCoreRegistersBaseAddress + 0x004C,
- kCSRInterruptTargetAddress = kCSRCoreRegistersBaseAddress + 0x0050,
- kCSRInterruptMaskAddress = kCSRCoreRegistersBaseAddress + 0x0054,
- kCSRClockValueHiAddress = kCSRCoreRegistersBaseAddress + 0x0058,
- kCSRClockValueMidAddress = kCSRCoreRegistersBaseAddress + 0x005C,
- kCSRClockTickPeriodMidAddress
- = kCSRCoreRegistersBaseAddress + 0x0060,
- kCSRClockTickPeriodLoAddress
- = kCSRCoreRegistersBaseAddress + 0x0064,
- kCSRClockStrobeArrivedHiAddress
- = kCSRCoreRegistersBaseAddress + 0x0068,
- kCSRClockStrobeArrivedMidAddress
- = kCSRCoreRegistersBaseAddress + 0x006C,
- kCSRClockInfo0Address = kCSRCoreRegistersBaseAddress + 0x0070,
- kCSRClockInfo1Address = kCSRCoreRegistersBaseAddress + 0x0074,
- kCSRClockInfo2Address = kCSRCoreRegistersBaseAddress + 0x0078,
- kCSRClockInfo3Address = kCSRCoreRegistersBaseAddress + 0x007C,
- kCSRMessageRequestAddress = kCSRCoreRegistersBaseAddress + 0x0080,
- kCSRMessageResponseAddress = kCSRCoreRegistersBaseAddress + 0x00C0,
- kCSRErrorLogBufferAddress = kCSRCoreRegistersBaseAddress + 0x0180,
-
- kCSRBusDependentRegistersBaseAddress
- = kCSRRegisterSpaceBaseAddressLo + 0x0200,
-
- kCSRROMBaseAddress = kCSRRegisterSpaceBaseAddressLo + 0x0400,
- kCSRBIBHeaderAddress = kCSRROMBaseAddress,
- kCSRBIBBusNameAddress = kCSRROMBaseAddress + 4
- };
-
-
- // CSR ROM search data types and structures.
-
- enum {
- /*
- ** Absolute locations
- */
- kIterateRoot = 0x2L,
- /*
- ** "Upward" Relationships
- */
- kIterateParents = 0x3L, /* include all parent(s) of entry */
- /*
- ** "Downward" Relationships
- //
- */
- kIterateChildren = 0x4L, /* include all children */
- kIterateSubTrees = 0x5L, /* include all sub trees of entry */
- kIterateDescendants = 0x5L, /* include all descendants of entry */
- /*
- ** "Horizontal" Relationships
- */
- kIterateSibling = 0x6L, /* include all siblings */
- /*
- ** Keep doing the same thing
- */
- kIterateContinue = 0x1L
- };
-
- enum
- {
- kInvalidCSRROMIterator = 0
- };
-
- enum
- {
- kCSRROMSearchForKey = 1
- };
-
- enum
- {
- kInvalidCSRROMEntryType = 0xFFFFFFFF,
- kImmediateCSRROMEntryType = 0,
- kOffsetCSRROMEntryType = 1,
- kLeafCSRROMEntryType = 2,
- kDirectoryCSRROMEntryType = 3
- };
-
- enum
- {
- kInvalidCSRROMEntryID = 0 // zzz should use generic invalid ID
- };
-
- // CSR defined 64 bit unique ID.
-
- struct CSRNodeUniqueIDStruct
- {
- UInt32 hi,
- lo; // Hi and lo values of 64 bit unique ID.
- };
- typedef struct CSRNodeUniqueIDStruct
- CSRNodeUniqueID,
- *CSRNodeUniqueIDPtr;
-
- typedef UInt32 CSRROMEntryIterator;
- typedef UInt32 CSRROMIterationOp;
- typedef struct OpaqueCSRROMEntryID* CSRROMEntryID;
-
- struct CSRROMSearchCriteriaStruct
- {
- UInt32 csrROMSearchType; // Type of search record.
- UInt32 keyType; // Key types to search for.
- UInt32 keyHi, // Key values to search for.
- keyLo; //zzz ought to provide nice way to set these.
- };
- typedef struct CSRROMSearchCriteriaStruct
- CSRROMSearchCriteria,
- *CSRROMSearchCriteriaPtr;
-
- /*zzz End put in IEEE1212.h */
-
-
- ////////////////////////////////////////////////////////////////////////////////
- //
- // FireWire CSR defs.
- //
-
- // FireWire core CSR registers.
-
- enum
- {
- kFWCSRStateGone = kFWBit16,
- kFWCSRStateLinkOff = kFWBit22,
- kFWCSRStateCMstr = kFWBit23
- };
-
- // FireWire bus/nodeID address defs.
-
- enum
- {
- kFWAddressBusID = FWBitRange (16, 25) << kCSRNodeIDPhase,
- kFWAddressBusIDPhase = FWBitRangePhase (16, 25) + kCSRNodeIDPhase,
-
- kFWAddressNodeID = FWBitRange (26, 31) << kCSRNodeIDPhase,
- kFWAddressNodeIDPhase = FWBitRangePhase (26, 31) + kCSRNodeIDPhase,
-
- kFWLocalBusID = 1023,
- kFWBroadcastNodeID = 63,
-
- kFWLocalBusAddress = kFWLocalBusID << kFWAddressBusIDPhase,
- kFWBroadcastAddress = kFWBroadcastNodeID << kFWAddressNodeIDPhase
- };
-
- #define FWNodeBaseAddress(busID, nodeID) \
- ( \
- (busID << kFWAddressBusIDPhase) | \
- (nodeID << kFWAddressNodeIDPhase) \
- )
-
- #define FWNodeRegisterSpaceBaseAddressHi(busID, nodeID) \
- ( \
- FWNodeBaseAddress (busID, nodeID) | \
- kCSRRegisterSpaceBaseAddressHi \
- )
-
-
- // FireWire CSR bus info block defs.
-
- enum
- {
- kFWBIBHeaderAddress = kCSRBIBHeaderAddress,
- kFWBIBBusNameAddress = kCSRBIBBusNameAddress,
- kFWBIBNodeCapabilitiesAddress
- = kCSRROMBaseAddress + 8,
- kFWBIBNodeUniqueIDHiAddress = kCSRROMBaseAddress + 12,
- kFWBIBNodeUniqueIDLoAddress = kCSRROMBaseAddress + 16,
-
- kFWBIBBusName = '1394',
-
- kFWBIBIrmc = kFWBit0,
- kFWBIBCmc = kFWBit1,
- kFWBIBIsc = kFWBit2,
- kFWBIBBmc = kFWBit3,
- kFWBIBCycClkAcc = FWBitRange (8, 15),
- kFWBIBCycClkAccPhase = FWBitRangePhase (8, 15),
- kFWBIBMaxRec = FWBitRange (16, 19),
- kFWBIBMaxRecPhase = FWBitRangePhase (16, 19)
- };
-
-
- ////////////////////////////////////////////////////////////////////////////////
- //
- // FireWire ID defs.
- //
-
- typedef struct OpaqueFWReferenceID* FWReferenceID;
- typedef struct OpaqueFWCommandObjectID* FWCommandObjectID;
- typedef struct OpaqueFWCommandID* FWCommandID;
- typedef struct OpaqueFWIMCommandID* FWIMCommandID;
- typedef struct OpaqueFWClientCommandID* FWClientCommandID;
- typedef struct OpaqueFWIMProcessID* FWIMProcessID;
- typedef struct OpaqueIsochChannelID* IsochChannelID;
- typedef struct OpaqueIsochPortID* IsochPortID;
- typedef struct OpaqueDCLProgramID* DCLProgramID;
- typedef struct OpaqueFWAddressSpaceID* FWAddressSpaceID;
- typedef struct OpaqueFWDeferredTaskID* FWDeferredTaskID;
- typedef FWReferenceID FWIMID;
- typedef FWReferenceID FWDeviceID;
- typedef FWReferenceID FWUnitID;
- typedef FWReferenceID FWClientID;
- typedef FWReferenceID FWDriverID;
- typedef FWReferenceID FWVDeviceID;
- typedef FWReferenceID FWPDriverID;
- typedef FWReferenceID FWIsochResourceManagerID;
-
- enum
- {
- kInvalidFWReferenceID = 0, // zzz should use generic invalid ID
- kInvalidFWIMID = kInvalidFWReferenceID, // zzz should use generic invalid ID ID for an invalid FWIM
- kInvalidFWDeviceID = kInvalidFWReferenceID, // zzz should use generic invalid ID ID for an invalid FWDriver
- kInvalidFWUnitID = kInvalidFWReferenceID, // zzz should use generic invalid ID ID for an invalid FWDriver
- kInvalidFWClientID = kInvalidFWReferenceID, // zzz should use generic invalid ID ID for an invalid FWDriver
- kInvalidFWDriverID = kInvalidFWReferenceID, // zzz should use generic invalid ID ID for an invalid FWDriver
- kInvalidFWVDeviceID = kInvalidFWReferenceID, // zzz should use generic invalid ID ID for an invalid FWDriver
- kInvalidFWPDriverID = kInvalidFWReferenceID, // zzz should use generic invalid ID ID for an invalid FWDriver
- kInvalidFWIsochResourceManagerID = kInvalidFWReferenceID, // zzz should use generic invalid ID ID for an invalid FWDriver
- kInvalidFWCommandObjectID = 0, // zzz should use generic invalid ID
- kInvalidFWCommandID = 0, // zzz should use generic invalid ID
- kInvalidFWIMCommandID = 0, // zzz should use generic invalid ID
- kInvalidFWClientCommandID = 0, // zzz should use generic invalid ID
- kInvalidFWIMProcessID = 0, // zzz should use generic invalid ID
- kInvalidIsochChannelID = 0, // zzz should use generic invalid ID
- kInvalidIsochPortID = 0, // zzz should use generic invalid ID ID for an invalid FWIM
- kInvalidDCLProgramID = 0, // zzz should use generic invalid ID
- kInvalidFWAddressSpaceID = 0, // zzz should use generic invalid ID
- kInvalidFWDeferredTaskID = 0 // zzz should use generic invalid ID
- };
-
-
- ////////////////////////////////////////////////////////////////////////////////
- //
- // FireWire deferred task defs.
- //
-
- typedef void (FWDeferredTaskProc) (
- void *param1,
- void *param2);
- typedef FWDeferredTaskProc *FWDeferredTaskProcPtr;
-
-
- ////////////////////////////////////////////////////////////////////////////////
- //
- // Address space defs.
- //
-
- enum
- {
- kFWAddressWriteEnable = kFWBit31,
- kFWAddressWriteRequestNotify = kFWBit30,
- kFWAddressWriteCompleteNotify = kFWBit29,
- kFWAddressReadEnable = kFWBit28,
- kFWAddressReadRequestNotify = kFWBit27,
- kFWAddressReadCompleteNotify = kFWBit26,
- kFWAddressLockEnable = kFWBit25,
- kFWAddressLockRequestNotify = kFWBit24,
- kFWAddressLockCompleteNotify = kFWBit23,
- kFWAddressLocation = FWBitRange (21, 22),
- kFWAddressLocationPhase = FWBitRangePhase (21, 22),
- kFWAddressInitialMemorySpace = 0,
- kFWAddressPrivateSpace = 1,
- kFWAddressInitialUnitsSpace = 2,
- kFWAddressOffsetInitialUnitsSpace = 3,
- kFWAddressPhysical = 4
- };
-
-
- ////////////////////////////////////////////////////////////////////////////////
- //
- // Isochronous channel defs.
- //
-
- enum
- {
- kFWIsochChannelUnknownCondition = 0,
- kFWIsochChannelNotEnoughBandwidth = 1,
- kFWIsochChannelChannelNotAvailable = 2
- };
-
- typedef OSStatus (FWIsochChannelForceStopNotificationProc) (
- IsochChannelID isochChannelID,
- UInt32 stopCondition);
- typedef FWIsochChannelForceStopNotificationProc
- *FWIsochChannelForceStopNotificationProcPtr;
-
-
- ////////////////////////////////////////////////////////////////////////////////
- //
- // Isochronous channel defs.
- //
-
- enum
- {
- kFWDCLImmediateEvent = 0,
- kFWDCLCycleEvent = 1,
- kFWDCLSyBitsEvent = 2
- };
-
- enum
- {
- kFWDCLInvalidNotification = 0,
- kFWDCLUpdateNotification = 1,
- kFWDCLModifyNotification = 2
- };
-
- enum
- {
- kFWDCLOpDynamicFlag = (1 << 16),
- kFWDCLOpVendorDefinedFlag = (1 << 17),
- kFWDCLOpFlagMask = BitRange (16, 31),
- kFWDCLOpFlagPhase = BitRangePhase (16, 31)
- };
-
- enum
- {
- kDCLInvalidOp = 0,
- kDCLSendPacketStartOp = 1,
- kDCLSendPacketWithHeaderStartOp
- = 2,
- kDCLSendPacketOp = 3,
- kDCLSendBufferOp = 4,
- kDCLReceivePacketStartOp = 5,
- kDCLReceivePacketOp = 6,
- kDCLReceiveBufferOp = 7,
- kDCLCallProcOp = 8,
- kDCLLabelOp = 9,
- kDCLJumpOp = 10,
- kDCLSetTagSyncBitsOp = 11,
- kDCLUpdateDCLListOp = 12,
- kDCLTimeStampOp = 13
- };
-
- typedef struct DCLCommandStruct
- DCLCommand,
- *DCLCommandPtr;
-
- struct DCLCommandStruct
- {
- DCLCommandPtr pNextDCLCommand; // Next DCL command.
- UInt32 compilerData; // Data for use by DCL compiler.
- UInt32 opcode; // DCL opcode.
- UInt32 operands[1]; // DCL operands.
- };
-
- struct DCLTransferPacketStruct
- {
- DCLCommandPtr pNextDCLCommand; // Next DCL command.
- UInt32 compilerData; // Data for use by DCL compiler.
- UInt32 opcode; // DCL opcode.
- Ptr buffer; // Packet buffer.
- UInt32 size; // Buffer size.
- };
- typedef struct DCLTransferPacketStruct
- DCLTransferPacket,
- *DCLTransferPacketPtr;
-
- struct DCLTransferBufferStruct
- {
- DCLCommandPtr pNextDCLCommand; // Next DCL command.
- UInt32 compilerData; // Data for use by DCL compiler.
- UInt32 opcode; // DCL opcode.
- Ptr buffer; // Buffer.
- UInt32 size; // Buffer size.
- UInt16 packetSize; // Size of packets to send.
- UInt16 reserved;
- UInt32 bufferOffset; // Current offset into buffer.
- };
- typedef struct DCLTransferBufferStruct
- DCLTransferBuffer,
- *DCLTransferBufferPtr;
-
- typedef void (DCLCallCommandProc) (
- DCLCommandPtr pDCLCommand);
- typedef DCLCallCommandProc *DCLCallCommandProcPtr;
-
- struct DCLCallProcStruct
- {
- DCLCommandPtr pNextDCLCommand; // Next DCL command.
- UInt32 compilerData; // Data for use by DCL compiler.
- UInt32 opcode; // DCL opcode.
- DCLCallCommandProcPtr proc; // Procedure to call.
- UInt32 procData; // Data for use by called procedure.
- };
- typedef struct DCLCallProcStruct
- DCLCallProc,
- *DCLCallProcPtr;
-
- struct DCLLabelStruct
- {
- DCLCommandPtr pNextDCLCommand; // Next DCL command.
- UInt32 compilerData; // Data for use by DCL compiler.
- UInt32 opcode; // DCL opcode.
- };
- typedef struct DCLLabelStruct
- DCLLabel,
- *DCLLabelPtr;
-
- struct DCLJumpStruct
- {
- DCLCommandPtr pNextDCLCommand; // Next DCL command.
- UInt32 compilerData; // Data for use by DCL compiler.
- UInt32 opcode; // DCL opcode.
- DCLLabelPtr pJumpDCLLabel; // DCL label to jump to.
- };
- typedef struct DCLJumpStruct
- DCLJump,
- *DCLJumpPtr;
-
- struct DCLSetTagSyncBitsStruct
- {
- DCLCommandPtr pNextDCLCommand; // Next DCL command.
- UInt32 compilerData; // Data for use by DCL compiler.
- UInt32 opcode; // DCL opcode.
- UInt16 tagBits; // Tag bits for following packets.
- UInt16 syncBits; // Sync bits for following packets.
- };
- typedef struct DCLSetTagSyncBitsStruct
- DCLSetTagSyncBits,
- *DCLSetTagSyncBitsPtr;
-
- struct DCLUpdateDCLListStruct
- {
- DCLCommandPtr pNextDCLCommand; // Next DCL command.
- UInt32 compilerData; // Data for use by DCL compiler.
- UInt32 opcode; // DCL opcode.
- DCLCommandPtr *dclCommandList; // List of DCL commands to update.
- UInt32 numDCLCommands; // Number of DCL commands in list.
- };
- typedef struct DCLUpdateDCLListStruct
- DCLUpdateDCLList,
- *DCLUpdateDCLListPtr;
-
- struct DCLTimeStampStruct
- {
- DCLCommandPtr pNextDCLCommand; // Next DCL command.
- UInt32 compilerData; // Data for use by DCL compiler.
- UInt32 opcode; // DCL opcode.
- UInt32 timeStamp; // Time stamp.
- };
- typedef struct DCLTimeStampStruct
- DCLTimeStamp,
- *DCLTimeStampPtr;
-
- typedef OSStatus (DCLProgramStartProc) (
- DCLProgramID dclProgramID);
- typedef DCLProgramStartProc *DCLProgramStartProcPtr;
-
- typedef OSStatus (DCLProgramStopProc) (
- DCLProgramID dclProgramID);
- typedef DCLProgramStopProc *DCLProgramStopProcPtr;
-
- typedef OSStatus (DCLProgramReleaseProc) (
- DCLProgramID dclProgramID);
- typedef DCLProgramReleaseProc *DCLProgramReleaseProcPtr;
-
- typedef OSStatus (DCLCompilerNotificationProc) (
- DCLProgramID dclProgramID,
- UInt32 notificationType,
- DCLCommandPtr *dclCommandList,
- UInt32 numDCLCommands);
- typedef DCLCompilerNotificationProc
- *DCLCompilerNotificationProcPtr;
-
-
- ////////////////////////////////////////////////////////////////////////////////
- //
- // Define some bus management constants.
- //
-
- enum
- {
- kFWBusManagerArbitrationTimeoutDuration
- = 625 * durationMillisecond
- };
-
-
- ////////////////////////////////////////////////////////////////////////////////
- //
- // Define some bus characteristics.
- //
-
- enum
- {
- kFWMaxBusses = 1023,
- kFWMaxNodesPerBus = 63,
- kFWMaxNodeHops = 16
- };
-
-
- ////////////////////////////////////////////////////////////////////////////////
- //
- // Packet defs.
- //
-
- // Phy packet defs.
-
- enum
- {
- kFWPhyPacketID = FWBitRange (0, 1),
- kFWPhyPacketIDPhase = FWBitRangePhase (0, 1),
-
- kFWPhyPacketPhyID = FWBitRange (2, 7),
- kFWPhyPacketPhyIDPhase = FWBitRangePhase (2, 7)
- };
-
- enum
- {
- kSelfIDPacketSize = 8,//zzz add FW
- kMaxSelfIDPacketsPerNode = 9//zzz add FW
- };
-
- enum
- {
- kFWConfigurationPacketID = 0,
- kFWLinkOnPacketID = 1,
- kFWSelfIDPacketID = 2
- };
-
- enum
- {
- kFWPhyConfigurationR = kFWBit8,
- kFWPhyConfigurationT = kFWBit9,
- kFWPhyConfigurationGapCnt = FWBitRange (10, 15),
- kFWPhyConfigurationGapCntPhase
- = FWBitRangePhase (10, 15)
- };
-
- enum
- {
- kFWSelfIDPortStatusChild = 3,
- kFWSelfIDPortStatusParent = 2,
- kFWSelfIDPortStatusNotConnected = 1,
- kFWSelfIDPortStatusNotPresent = 0,
-
- kFWSelfIDNoPower = 0,
- kFWSelfIDSelfPowered15W = 1,
- kFWSelfIDSelfPowered30W = 2,
- kFWSelfIDSelfPowered45W = 3,
- kFWSelfIDBusPowered1W = 4,
- kFWSelfIDBusPowered3W = 5,
- kFWSelfIDBusPowered6W = 6,
- kFWSelfIDBusPowered10W = 7,
-
- kFWSelfIDPhyID = kFWPhyPacketPhyID,//zzz do we need or want this?
- kFWSelfIDPhyIDPhase = kFWPhyPacketPhyIDPhase,
- kFWSelfIDM = kFWBit31,
-
- kFWSelfID0L = kFWBit9,
- kFWSelfID0GapCnt = FWBitRange (10, 15),
- kFWSelfID0GapCntPhase = FWBitRangePhase (10, 15),
- kFWSelfID0SP = FWBitRange (16, 17),
- kFWSelfID0SPPhase = FWBitRangePhase (16, 17),
- kFWSelfID0Del = FWBitRange (18, 19),
- kFWSelfID0DelPhase = FWBitRangePhase (18, 19),
- kFWSelfID0C = kFWBit20,
- kFWSelfID0Pwr = FWBitRange (21, 23),
- kFWSelfID0PwrPhase = FWBitRangePhase (21, 23),
- kFWSelfID0P0 = FWBitRange (24, 25),
- kFWSelfID0P0Phase = FWBitRangePhase (24, 25),
- kFWSelfID0P1 = FWBitRange (26, 27),
- kFWSelfID0P1Phase = FWBitRangePhase (26, 27),
- kFWSelfID0P2 = FWBitRange (28, 29),
- kFWSelfID0P2Phase = FWBitRangePhase (28, 29),
- kFWSelfID0I = kFWBit30,
-
- kFWSelfIDPacketType = kFWBit8,
- kFWSelfIDNN = FWBitRange (9, 11),
- kFWSelfIDNNPhase = FWBitRangePhase (9, 11),
- kFWSelfIDNPa = FWBitRange (14, 15),
- kFWSelfIDNPaPhase = FWBitRangePhase (14, 15),
- kFWSelfIDNPb = FWBitRange (16, 17),
- kFWSelfIDNPbPhase = FWBitRangePhase (16, 17),
- kFWSelfIDNPc = FWBitRange (18, 19),
- kFWSelfIDNPcPhase = FWBitRangePhase (18, 19),
- kFWSelfIDNPd = FWBitRange (20, 21),
- kFWSelfIDNPdPhase = FWBitRangePhase (20, 21),
- kFWSelfIDNPe = FWBitRange (22, 23),
- kFWSelfIDNPePhase = FWBitRangePhase (22, 23),
- kFWSelfIDNPf = FWBitRange (24, 25),
- kFWSelfIDNPfPhase = FWBitRangePhase (24, 25),
- kFWSelfIDNPg = FWBitRange (26, 27),
- kFWSelfIDNPgPhase = FWBitRangePhase (26, 27),
- kFWSelfIDNPh = FWBitRange (28, 29),
- kFWSelfIDNPhPhase = FWBitRangePhase (28, 29),
- kFWSelfIDMore = kFWBit31
- };
-
- // Primary packet defs.
-
- enum
- {
- kFWSpeed100MBit = 0,
- kFWSpeed200MBit = 1,
- kFWSpeed400MBit = 2,
- kFWSpeedMaximum = 0x7FFFFFFF, //zzz what are the best numbers???
- kFWSpeedInvalid = 0x80000000
- };
-
- enum
- {
- kFWTCodeWriteQuadlet = 0,
- kFWTCodeWriteBlock = 1,
- kFWTCodeWriteResponse = 2,
- kFWTCodeReadQuadlet = 4,
- kFWTCodeReadBlock = 5,
- kFWTCodeReadQuadletResponse = 6,
- kFWTCodeReadBlockResponse = 7,
- kFWTCodeCycleStart = 8,
- kFWTCodeLock = 9,
- kFWTCodeIsochronousBlock = 10,
- kFWTCodeLockResponse = 11,
- kFWTCodePHYPacket = 14
- };
-
- enum
- {
- kFWExtendedTCodeMaskSwap = 1,
- kFWExtendedTCodeCompareSwap = 2,
- kFWExtendedTCodeFetchAdd = 3,
- kFWExtendedTCodeLittleAdd = 4,
- kFWExtendedTCodeBoundedAdd = 5,
- kFWExtendedTCodeWrapAdd = 6,
- kFWExtendedTCodeVendorDependent = 7
- };
-
- enum
- {
- kFWResponseComplete = 0,
- kFWResponseConflictError = 4,
- kFWResponseDataError = 5,
- kFWResponseTypeError = 6,
- kFWResponseAddressError = 7
- };
-
- enum
- {
- kFWAckComplete = 1,
- kFWAckPending = 2,
- kFWAckBusyX = 4,
- kFWAckBusyA = 5,
- kFWAckBusyB = 6,
- kFWAckDataError = 13,
- kFWAckTypeError = 14
- };
-
-
- enum
- {
- kFWIsochDataLength = FWBitRange (0, 15),
- kFWIsochDataLengthPhase = FWBitRangePhase (0, 15),
-
- kFWIsochTag = FWBitRange (16, 17),
- kFWIsochTagPhase = FWBitRangePhase (16, 17),
-
- kFWIsochChanNum = FWBitRange (18, 23),
- kFWIsochChanNumPhase = FWBitRangePhase (18, 23),
-
- kFWIsochTCode = FWBitRange (24, 27),
- kFWIsochTCodePhase = FWBitRangePhase (24, 27),
-
- kFWIsochSy = FWBitRange (28, 31),
- kFWIsochSyPhase = FWBitRangePhase (28, 31)
- };
-
-
- // Topology map.
-
- enum
- {
- kFWTopologyMapMaxSelfIDs = kFWMaxNodesPerBus * kMaxSelfIDPacketsPerNode
- };
-
- struct FWTopologyMapStruct
- {
- UInt16 length;
- UInt16 CRC;
- UInt32 generationNumber;
- UInt16 nodeCount;
- UInt16 selfIDCount;
- UInt32 selfIDs[kFWTopologyMapMaxSelfIDs];
- };
- typedef struct FWTopologyMapStruct
- FWTopologyMap,
- *FWTopologyMapPtr;
-
- // Speed map.
-
- enum
- {
- kFWSpeedMapMaxSpeedCodes = (kFWMaxNodesPerBus + 1) * (kFWMaxNodesPerBus - 1) +
- (kFWMaxNodesPerBus - 1)
- };
-
- struct FWSpeedMapStruct
- {
- UInt16 length;
- UInt16 CRC;
- UInt32 generationNumber;
- UInt8 speedCodes[kFWSpeedMapMaxSpeedCodes];
- };
- typedef struct FWSpeedMapStruct FWSpeedMap,
- *FWSpeedMapPtr;
-
- ////////////////////////////////////////////////////////////////////////////////
- //
- // FireWire client defs.
- //
-
- enum
- {
- kFWClientCommandQueueActiveBit = 0,
- kFWClientCommandQueueActiveByte = 1,
- kFWClientCommandQueueActive = (1 << kFWClientCommandQueueActiveBit)
- };
-
- enum
- {
- kFWClientCommandBusy = 1,
- kFWClientCommandWaiting = 2
- };
-
- enum
- {
- kFWClientCommandSyncFlag = (1 << 0),
- kFWClientCommandImmediateFlag = (1 << 1)
- };
-
- enum
- {
- kFWClientCommandAcceptNoMore
- = 0,
- kFWClientCommandAcceptMore = 1,
- kFWClientCommandRejected = 2
- };
-
- enum
- {
- kFWClientResetNotify = 1, // Notify client that a reset occured.
- kFWClientBusManagementNotify = 2, // Notify client that a reset occured and bus management has been established.
- kFWClientReadRequest = 3, // Read request from client's address space.
- kFWClientReadComplete = 4, // Read complete from client's address space.
- kFWClientWriteRequest = 5, // Write request to a client's address space.
- kFWClientWriteComplete = 6, // Write complete to a client's address space.
- kFWClientLockRequest = 7, // Lock request to a client's address space.
- kFWClientLockComplete = 8, // Lock complete to a client's address space.
- kFWClientInitIsochPort = 9, // Initialize an isochronous port.
- kFWClientReleaseIsochPort = 10, // Release resources allocated for isochronous port.
- kFWClientStartIsochPort = 11, // Start data flow through isoch port.
- kFWClientStopIsochPort = 12, // Stop data flow through isoch port.
- kFWClientSBP2LoginNotify = 13, // Login-related notification
- kFWClientSBP2StatusNotify = 14, // ORB-related notification
- kFWClientSBP2UnsolicitedStatusNotify = 15 // Unsolicited SBP-2 status
- };
-
-
- // Define FireWire Client command param structures.
-
- typedef struct FWClientInterfaceParamsStruct
- FWClientInterfaceParams,
- *FWClientInterfaceParamsPtr;
-
- typedef void (FWClientCommandCompletionProc) (
- FWClientInterfaceParamsPtr pFWClientInterfaceParams);
- typedef FWClientCommandCompletionProc
- *FWClientCommandCompletionProcPtr;
-
- struct FWClientInterfaceParamsStruct
- {
- UInt32 interfaceSelector; // Selector indicating the type of request.
- FWReferenceID fwReferenceID; // Reference to target of command.
- FWClientCommandID fwClientCommandID; // ID for this command.
- UInt32 fwClientSpecificData; // Data specific to the FireWire client.
- };
-
- struct FWClientAsynchRequestParamsStruct
- {
- FWClientInterfaceParams fwClientInterfaceParams; // Common set of interface params.
- UInt32 generation; // Generation number that request was received on.
- Ptr receiveBuffer; // Pointer to buffer with receive data.
- Ptr transmitBuffer; // Pointer to buffer with transmit data.
- UInt16 sourceID; // Node ID of source of the request.
- UInt16 responseCode; // Response code.
- UInt32 offset; // Offset of request within target address space.
- UInt16 length; // Length of request.
- UInt16 extendedTCode; // Extended transaction code.
- FWAddressSpaceID fwAddressSpaceID; // ID of the target address space.
- Ptr pAddressSpecificData; // Pointer to data specific to the address space.
- UInt32 speed; // Received speed, and speed to reply at.
- };
- typedef struct FWClientAsynchRequestParamsStruct
- FWClientAsynchRequestParams,
- *FWClientAsynchRequestParamsPtr;
-
- struct FWClientIsochPortParamsStruct
- {
- IsochChannelID isochChannelID; // Reference to the channel that this port belongs to.
- UInt32 refCon; // Reference constant for specific port.
- Boolean portIsTalker; // Boolean indicating that this channel is the talker.
- };
- typedef struct FWClientIsochPortParamsStruct
- FWClientIsochPortParams,
- *FWClientIsochPortParamsPtr;
-
- struct FWClientInitIsochPortParamsStruct
- {
- FWClientInterfaceParams fwClientInterfaceParams; // Common set of interface params.
- FWClientIsochPortParams fwClientIsochPortParams; // Params for all isoch port requests.
- UInt32 channelNum; // Channel number for port.
- UInt32 supportedChannelNumHi, // Channel numbers supported by port.
- supportedChannelNumLo;
- UInt32 speed; // Speed of channel.
- Boolean trial; // Boolean indicating that this call is just a trial.
- };
- typedef struct FWClientInitIsochPortParamsStruct
- FWClientInitIsochPortParams,
- *FWClientInitIsochPortParamsPtr;
-
- struct FWClientReleaseIsochPortParamsStruct
- {
- FWClientInterfaceParams fwClientInterfaceParams; // Common set of interface params.
- FWClientIsochPortParams fwClientIsochPortParams; // Params for all isoch port requests.
- };
- typedef struct FWClientReleaseIsochPortParamsStruct
- FWClientReleaseIsochPortParams,
- *FWClientReleaseIsochPortParamsPtr;
-
- struct FWClientIsochPortControlParamsStruct
- {
- FWClientInterfaceParams fwClientInterfaceParams; // Common set of interface params.
- FWClientIsochPortParams fwClientIsochPortParams; // Params for all isoch port requests.
- };
- typedef struct FWClientIsochPortControlParamsStruct
- FWClientIsochPortControlParams,
- *FWClientIsochPortControlParamsPtr;
-
- struct FWClientPowerNotifyParamsStruct
- {
- FWClientInterfaceParams fwClientInterfaceParams; // Common set of interface params.
- FWCommandObjectID fwCommandObjectID; // Power command object ID
- UInt32 notificationEvent;
- };
- typedef struct FWClientPowerNotifyParamsStruct
- FWClientPowerNotifyParams,
- *FWClientPowerNotifyParamsPtr;
-
-
- // Define FireWire Client procs.
-
- typedef OSStatus (FWClientInterfaceProc) (
- FWClientInterfaceParamsPtr pFWClientInterfaceParams,
- UInt32 *pCommandAcceptance);
- typedef FWClientInterfaceProc *FWClientInterfaceProcPtr;
-
- typedef FWClientInterfaceProc FWClientResetNotifyProc,
- *FWClientResetNotifyProcPtr;
-
- typedef OSStatus (FWClientReadProc) (
- FWClientAsynchRequestParamsPtr
- pAsynchRequestParams,
- UInt32 *pCommandAcceptance);
- typedef FWClientReadProc *FWClientReadProcPtr;
-
- typedef OSStatus (FWClientWriteProc) (
- FWClientAsynchRequestParamsPtr
- pAsynchRequestParams,
- UInt32 *pCommandAcceptance);
- typedef FWClientWriteProc *FWClientWriteProcPtr;
-
- typedef OSStatus (FWClientLockProc) (
- FWClientAsynchRequestParamsPtr
- pAsynchRequestParams,
- UInt32 *pCommandAcceptance);
- typedef FWClientLockProc *FWClientLockProcPtr;
-
- typedef OSStatus (FWClientInitIsochPortProc) (
- FWClientInitIsochPortParamsPtr
- pInitIsochPortParams,
- UInt32 *pCommandAcceptance);
- typedef FWClientInitIsochPortProc
- *FWClientInitIsochPortProcPtr;
-
- typedef OSStatus (FWClientReleaseIsochPortProc) (
- FWClientReleaseIsochPortParamsPtr
- pReleaseIsochPortParams,
- UInt32 *pCommandAcceptance);
- typedef FWClientReleaseIsochPortProc
- *FWClientReleaseIsochPortProcPtr;
-
- typedef OSStatus (FWClientStartIsochPortProc) (
- FWClientIsochPortControlParamsPtr
- pIsochPortControlParams,
- UInt32 *pCommandAcceptance);
- typedef FWClientStartIsochPortProc
- *FWClientStartIsochPortProcPtr;
-
- typedef OSStatus (FWClientStopIsochPortProc) (
- FWClientIsochPortControlParamsPtr
- pIsochPortControlParams,
- UInt32 *pCommandAcceptance);
- typedef FWClientStopIsochPortProc
- *FWClientStopIsochPortProcPtr;
-
- typedef OSStatus (FWClientPowerNotifyProc) (
- FWClientPowerNotifyParamsPtr
- pPowerNotifyParams,
- UInt32 *pCommandAcceptance);
- typedef FWClientPowerNotifyProc *FWClientPowerNotifyProcPtr;
-
-
- ////////////////////////////////////////////////////////////////////////////////
- //
- // Gestalt defs - JKL: need to go into MasterInterfaces Gestalt.i
- //
-
- enum {
- gestaltFireWireVersion = 'fwve', // FireWire version
- kFireWireVersion = 0x0200, // current SDK version is 2.0
- gestaltFireWireAttr = 'fwat', // FireWire attributes
- gestaltHasFireWirePorts = 0x00000001 // bit 0 set to 1 if FireWire hardware is detected
- };
-
- ////////////////////////////////////////////////////////////////////////////////
- //
- // FWIM defs.
- //
-
- // Define FWIM command types.
-
- enum
- {
- kFWIMSendLinkOnPacket
- = 1, // Send a phy configuration packet.
- kFWIMSendPhyConfigurationPacket
- = 2, // Send a phy configuration packet.
- kFWIMRead = 3, // Perform a read transaction.
- kFWIMReadResponse = 4, // Transmit a read response.
- kFWIMWrite = 5, // Perform a write transaction.
- kFWIMWriteResponse = 6, // Transmit a write response.
- kFWIMLock = 7, // Perform a lock transaction.
- kFWIMLockResponse = 8, // Transmit a lock response.
- kFWIMAllocateIsochPort = 9, // Allocate an isochronous port.
- kFWIMReleaseIsochPort = 10, // Release resources allocated for an isochronous port.
- kFWIMStartIsochPort = 11, // Start isochronous port.
- kFWIMStopIsochPort = 12, // Stop isochronous port.
- kFWIMResetBus = 13, // Reset the FireWire bus.
- kFWIMSetContenderBit = 14, // Set the contender bit on the next bus reset.
- kFWIMClearContenderBit = 15, // Clear the contender bit on the next bus reset.
- kFWIMEnableCycleMaster = 16, // Enable cycle mastering.
- kFWIMDisableCycleMaster = 17, // Disable cycle mastering.
- kFWIMSetRootHoldoffBit = 18, // Set the root holdoff bit.
- kFWIMClearRootHoldoffBit = 19, // Clear the root holdoff bit.
- kFWIMGetUniqueID = 20, // Get the local unique ID.
- kFWIMSetCSRROM = 21, // Set new CSR ROM data.
- kFWIMDoLocalCompareSwap = 22, // Do a Compare/Swap (OpenHCI IRM only).
- kFWIMSetAsynchFilters = 23, // Set asynch/physical filters.
- kFWIMSetFWIMState = 24 // Sleep/Wake/Quiesce FWIM for power saving or replacement.
- };
-
-
- // Defs for calls from the FWIM interface.
-
- enum
- {
- kFWIMProcessSelfIDs = 1,
- kFWIMProcessRead = 2,
- kFWIMProcessWrite = 3,
- kFWIMProcessLock = 4
- };
-
- // Defs for calls to the FWIM interface.
- //zzz some of this stuff should be private
-
- enum
- {
- kFWIMCommandSyncFlag = (1 << 0), // Perform FWIM command synchronously.
- kFWIMCommandPriorityFlag = (1 << 1), // This is a priority command.
- kFWIMCommandImmediateFlag = (1 << 2) // Perform FWIM command immediately.
- };
-
- enum
- {
- kFWIMCommandQueueActiveBit = 0,
- kFWIMCommandQueueActiveByte = 1,
- kFWIMCommandQueueActive = (1 << kFWIMCommandQueueActiveBit),
-
- kFWIMCommandQueueDisabledBit = 1,
- kFWIMCommandQueueDisabledByte = 1,
- kFWIMCommandQueueDisabled = (1 << kFWIMCommandQueueDisabledBit)
- };
-
- enum
- {
- kFWIMCommandBusy = 1
- };
-
- enum
- {
- kFWIMCommandAcceptNoMore = 0,
- kFWIMCommandAcceptMore = 1,
- kFWIMCommandRejected = 2
- };
-
- enum
- {
- kFWIMFeatureCSRROMMap = (1 << 0), // Has CSR ROM mapping function
- kFWIMFeatureIRM = (1 << 1), // Has IRM registers in hardware
- kFWIMFeaturePhysicalDMA = (1 << 2), // Has some kind of Physical DMA
- kFWIMFeatureAsynchFilters = (1 << 3), // Has OHCI-style asynch/phys filters
- kFWIMFeatureSetFWIMState = (1 << 4) // Can be slept/quiesced
- };
-
- typedef struct FWIMCommandParamsStruct
- FWIMCommandParams,
- *FWIMCommandParamsPtr;
-
- typedef void (FWIMCommandCompletionProc) (
- FWIMCommandParamsPtr pFWIMCommandParams);
- typedef FWIMCommandCompletionProc
- *FWIMCommandCompletionProcPtr;
-
- struct FWIMInitializeParamsStruct
- {
- UInt32 fwimSpecificData; // Data specific to FWIM
- FWIMID fwimID; // ID for this FWIM
- RegEntryID fwimRegEntryID; // Name registry entry for FireWire bus device
- UInt32 fwimFeatures; // Return area for FWIM features
- UInt32 fwimCSRROMMapLength; // Length of CSR ROM mapper, if available
- UInt32 fwimDeciWatts; // Deciwatts provided by hardware
- UInt32 fwimDeciVoltsMinimum; // Minimum decivolts at above load
- UInt32 fwimDeciVoltsMaximum; // Maximum decivolts at no load
- };
- typedef struct FWIMInitializeParamsStruct
- FWIMInitializeParams,
- *FWIMInitializeParamsPtr;
-
- struct FWIMFinalizeParamsStruct
- {
- UInt32 fwimSpecificData; // Data specific to FWIM
- FWIMID fwimID; // ID for this FWIM
- RegEntryID fwimRegEntryID; // Name registry entry for FireWire bus device
- };
- typedef struct FWIMFinalizeParamsStruct
- FWIMFinalizeParams,
- *FWIMFinalizeParamsPtr;
-
- struct FWIMPollInterruptsParamsStruct
- {
- UInt32 fwimSpecificData; // Data specific to FWIM
- FWIMID fwimID; // ID for this FWIM
- };
- typedef struct FWIMPollInterruptsParamsStruct
- FWIMPollInterruptsParams,
- *FWIMPollInterruptsParamsPtr;
-
- struct FWIMCommandParamsStruct
- {
- UInt32 commandType; // Type of command.
- FWIMID fwimID; // Reference to target FWIM.
- UInt32 fwimSpecificData; // Data specific to FWIM.
- FWIMCommandID fwimCommandID; // ID for this command.
- };
-
- struct FWIMGetUniqueIDParamsStruct
- {
- FWIMCommandParams fwimCommandParams; // Common command params.
- CSRNodeUniqueID uniqueID; // Local unique ID.
- };
- typedef struct FWIMGetUniqueIDParamsStruct
- FWIMGetUniqueIDParams,
- *FWIMGetUniqueIDParamsPtr;
-
- struct FWIMSendPhyPacketParamsStruct
- {
- FWIMCommandParams fwimCommandParams; // Common command params.
- UInt32 generation; // FireWire bus generation number.
- Ptr buffer; // Buffer with phy packet data.
- UInt32 length; // Length of packet data.
- UInt32 commandStorage; // Most common phy packets only need 4 bytes.
- };
- typedef struct FWIMSendPhyPacketParamsStruct
- FWIMSendPhyPacketParams,
- *FWIMSendPhyPacketParamsPtr;
-
- struct FWIMSetCSRROMParamsStruct
- {
- FWIMCommandParams fwimCommandParams; // Common command params.
- Ptr pCSRROM; // Buffer with ROM image.
- UInt32 length; // Length of valid ROM image.
- UInt32 *clearWhenDone; // UInt32 for FWIM to clear when complete.
- };
- typedef struct FWIMSetCSRROMParamsStruct
- FWIMSetCSRROMParams,
- *FWIMSetCSRROMParamsPtr;
-
- // These are registers implemented in hardware by OpenHCI:
- enum
- {
- kFW_OHCI_BUS_MANAGER_ID = 0,
- kFW_OHCI_BANDWIDTH_AVAILABLE = 1,
- kFW_OHCI_CHANNELS_AVAILABLE_HI = 2,
- kFW_OHCI_CHANNELS_AVAILABLE_LO = 3
- };
-
- struct FWIMCompareSwapParamsStruct
- {
- FWIMCommandParams fwimCommandParams; // Common command params.
- UInt32 targetRegister; // from above enum
- UInt32 oldValue; // value we think it is
- UInt32 newValue; // value we want it to be
- UInt32 returnValue; // result
- };
- typedef struct FWIMCompareSwapParamsStruct
- FWIMCompareSwapParams,
- *FWIMCompareSwapParamsPtr;
-
- struct FWIMSetAsynchFiltersParamsStruct
- {
- FWIMCommandParams fwimCommandParams; // Common command params.
- UInt32 asynchFilterHi; // Asynchronous receive filter.
- UInt32 asynchFilterLo;
- UInt32 physicalFilterHi; // Physical DMA filter.
- UInt32 physicalFilterLo;
- };
- typedef struct FWIMSetAsynchFiltersParamsStruct
- FWIMSetAsynchFiltersParams,
- *FWIMSetAsynchFiltersParamsPtr;
-
- struct FWIMSetFWIMStateParamsStruct
- {
- FWIMCommandParams fwimCommandParams; // Common command params.
- Boolean fwimState; // Active,standby,etc.
- };
- typedef struct FWIMSetFWIMStateParamsStruct
- FWIMSetFWIMStateParams,
- *FWIMSetFWIMStateParamsPtr;
-
- struct FWIMAsynchCommandParamsStruct
- {
- FWIMCommandParams fwimCommandParams; // Common command params.
- Duration timeout; // Split transaction timeout.
- UInt32 generation; // FireWire bus generation number.
- Ptr buffer; // Local buffer to read/write into/from
- UInt8 numRetries; // Number of retries left.
- UInt8 speed; // Transmission speed.
- UInt16 reserved;
- UInt32 addressHi,
- addressLo; // FireWire bus address to read/write from/to
- UInt16 length; // Length of read/write
- UInt16 extendedTCode; // Extended transaction code.
- };
- typedef struct FWIMAsynchCommandParamsStruct
- FWIMAsynchCommandParams,
- *FWIMAsynchCommandParamsPtr;
-
- enum
- {
- kFWTransactionDescriptorTLabel = FWBitRange (16, 21),
- kFWTransactionDescriptorTLabelPhase = FWBitRangePhase (16, 21)
- };
-
- enum //zzz need FWBitRange16
- {
- kFWResponseDataRCode = FWBitRange (16, 19),
- kFWResponseDataRCodePhase = FWBitRangePhase (16, 19)
- };
-
- struct FWIMAsynchResponseCommandParamsStruct
- {
- FWIMCommandParams fwimCommandParams; // Common command params.
- AbsoluteTime timeout; // Timeout for this response.
- UInt32 generation; // Topology map generation number this response is valid for.
- Ptr buffer; // Response buffer.
- UInt8 numRetries; // Number of retries left.
- UInt8 speed; // Transmission speed.
- UInt16 transactionDescriptor; // Descriptor for transaction.
- UInt16 destinationID; // Destination node ID for this response.
- UInt16 responseDataHi; // Response data for transaction.
- UInt32 responseDataLo;
- UInt16 length; // Length of response data.
- UInt16 extendedTCode; // Extended transaction code for this response.
- };
- typedef struct FWIMAsynchResponseCommandParamsStruct
- FWIMAsynchResponseCommandParams,
- *FWIMAsynchResponseCommandParamsPtr;
-
- struct FWIMIsochPortCommandParamsStruct
- {
- IsochPortID isochPortID; // Isochronous port ID.
- UInt32 fwimIsochPortData; // Data for FWIM to use for this isoch port.
- };
- typedef struct FWIMIsochPortCommandParamsStruct
- FWIMIsochPortCommandParams,
- *FWIMIsochPortCommandParamsPtr;
-
- struct FWIMAllocateIsochPortParamsStruct
- {
- FWIMCommandParams fwimCommandParams; // Common command params.
- FWIMIsochPortCommandParams fwimIsochPortCommandParams; // Common isoch port request params.
- DCLProgramID dclProgramID; // DCL program for this port.
- UInt32 channelNum; // Isochronous channel number.
- UInt32 speed; // Speed to use for channel.
- Boolean talking; // Buffer is for talking (listening if false).
- };
- typedef struct FWIMAllocateIsochPortParamsStruct
- FWIMAllocateIsochPortParams,
- *FWIMAllocateIsochPortParamsPtr;
-
- struct FWIMReleaseIsochPortParamsStruct
- {
- FWIMCommandParams fwimCommandParams; // Common command params.
- FWIMIsochPortCommandParams fwimIsochPortCommandParams; // Common isoch port request params.
- };
- typedef struct FWIMReleaseIsochPortParamsStruct
- FWIMReleaseIsochPortParams,
- *FWIMReleaseIsochPortParamsPtr;
-
- struct FWIMIsochPortControlParamsStruct
- {
- FWIMCommandParams fwimCommandParams; // Common command params.
- FWIMIsochPortCommandParams fwimIsochPortCommandParams; // Common isoch port request params.
- };
- typedef struct FWIMIsochPortControlParamsStruct
- FWIMIsochPortControlParams,
- *FWIMIsochPortControlParamsPtr;
-
- struct FWIMGetCycleTimeParamsStruct
- {
- FWIMCommandParams fwimCommandParams; // Common command params.
- UInt32 *pCycleTime; // return value.
- };
- typedef struct FWIMGetCycleTimeParamsStruct
- FWIMGetCycleTimeParams,
- *FWIMGetCycleTimeParamsPtr;
-
- // Define FWIM plug in dispatch table.
-
- typedef OSStatus (FWIMInitializeProc) (
- FWIMInitializeParamsPtr pFWIMInitializeParams);
- typedef FWIMInitializeProc *FWIMInitializeProcPtr;
-
- typedef OSStatus (FWIMFinalizeProc) (
- FWIMFinalizeParamsPtr pFWIMFinalizeParams);
- typedef FWIMFinalizeProc *FWIMFinalizeProcPtr;
-
- typedef OSStatus (FWIMPollInterruptsProc) (
- FWIMPollInterruptsParamsPtr pFWIMPollInterruptsParams);
- typedef FWIMPollInterruptsProc *FWIMPollInterruptsProcPtr;
-
- typedef OSStatus (FWIMCommandProc) (
- FWIMCommandParamsPtr pFWIMCommandParams,
- UInt32 *pCommandAcceptance);
- typedef FWIMCommandProc *FWIMCommandProcPtr;
-
- typedef OSStatus (FWIMSendPhyPacketProc) (
- FWIMSendPhyPacketParamsPtr pFWIMSendPhyPacketParams,
- UInt32 *pCommandAcceptance);
- typedef FWIMSendPhyPacketProc *FWIMSendPhyPacketProcPtr;
-
- typedef OSStatus (FWIMAsynchTransactionProc) (
- FWIMAsynchCommandParamsPtr pFWIMAsynchCommandParams,
- UInt32 *pCommandAcceptance);
- typedef FWIMAsynchTransactionProc
- *FWIMAsynchTransactionProcPtr;
-
- typedef OSStatus (FWIMSendAsynchResponsePacketProc) (
- FWIMAsynchResponseCommandParamsPtr
- pFWIMAsynchResponseCommandParams,
- UInt32 *pCommandAcceptance);
- typedef FWIMSendAsynchResponsePacketProc
- *FWIMSendAsynchResponsePacketProcPtr;
-
- typedef OSStatus (FWIMAllocateIsochPortProc) (
- FWIMAllocateIsochPortParamsPtr
- pFWIMAllocateIsochPortParams,
- UInt32 *pCommandAcceptance);
- typedef FWIMAllocateIsochPortProc
- *FWIMAllocateIsochPortProcPtr;
-
- typedef OSStatus (FWIMReleaseIsochPortProc) (
- FWIMReleaseIsochPortParamsPtr
- pFWIMReleaseIsochPortParams,
- UInt32 *pCommandAcceptance);
- typedef FWIMReleaseIsochPortProc
- *FWIMReleaseIsochPortProcPtr;
-
- typedef OSStatus (FWIMControlIsochPortProc) (
- FWIMIsochPortControlParamsPtr
- pFWIMIsochPortControlParams,
- UInt32 *pCommandAcceptance);
- typedef FWIMControlIsochPortProc
- *FWIMControlIsochPortProcPtr;
-
- typedef OSStatus (FWIMGetUniqueIDProc) (
- FWIMGetUniqueIDParamsPtr pFWIMGetUniqueIDParams,
- UInt32 *pCommandAcceptance);
- typedef FWIMGetUniqueIDProc *FWIMGetUniqueIDProcPtr;
-
- typedef OSStatus (FWIMSetCSRROMProc) (
- FWIMSetCSRROMParamsPtr pFWIMSetCSRROMParams,
- UInt32 *pCommandAcceptance);
- typedef FWIMSetCSRROMProc *FWIMSetCSRROMProcPtr;
-
- typedef OSStatus (FWIMDoLocalCompareSwapProc) (
- FWIMCompareSwapParamsPtr pFWIMCompareSwapParams);
- typedef FWIMDoLocalCompareSwapProc *FWIMDoLocalCompareSwapProcPtr;
-
- typedef OSStatus (FWIMSetAsynchFiltersProc) (
- FWIMSetAsynchFiltersParamsPtr pFWIMSetAsynchFiltersParams);
- typedef FWIMSetAsynchFiltersProc *FWIMSetAsynchFiltersProcPtr;
-
- typedef OSStatus (FWIMSetFWIMStateProc) (
- FWIMSetFWIMStateParamsPtr pFWIMSetFWIMStateParams);
- typedef FWIMSetFWIMStateProc *FWIMSetFWIMStateProcPtr;
-
- typedef OSStatus (FWIMGetCycleTimeProc) (
- FWIMGetCycleTimeParamsPtr pFWIMGetCycleTimeParams);
- typedef FWIMGetCycleTimeProc *FWIMGetCycleTimeProcPtr;
-
- // FWIM States. Pretty much the same values as from Driver Gestalt in Designing PCI Cards and Drivers.
- // Why aren't these values in DriverGestalt.h?!?
- // Quiesced means "thou shalt not call the FSL no matter what. This is important if we are in the process
- // of replacing it. If a FWIM can't be quiesced but is in ROM we probably can't boot from it since we need to remove
- // the FWIM while replacing the FSL. If we get a page fault after that - well that's bad right?
- // If the FWIM is successfully put to sleep with a kFWIMSleep request then the FWIM should not assume that
- // its hardware is in a known state when waking back up again. The FWIM should completely re-initialize itself.
- enum
- {
- kFWIMActive = 0, // Normal FWIM operating mode. Not Quiesced
- kFWIMStandby = 1, // Minimal energy saving, active in 5 sec. Not Quiesced
- kFWIMIdle = 2, // Substantial energy saving, active in 15 sec. Quiesced.
- kFWIMSleep = 3 // Maximum savings, system hardware may be subsequently turned off, Quiesced.
- };
-
- enum
- {
- kFWIMPluginVersion = 0x00010000, // For FSL 1.0-style FWIMs
- kFWIMPluginVersion11 = 0x00010001 // FWIM supports SetCSRROM, LocalCS, filters,
- // etc., & returns feature info upon install.
- // For use with FireWire Support 1.1.
- };
-
- // This table must be extended only at the end. No entries may ever be deleted.
-
- struct FWIMPluginDispatchTableStruct
- {
- UInt32 pluginVersion;
- FWIMInitializeProcPtr fwimInitializeProc; // Proc that initializes the FWIM.
- FWIMFinalizeProcPtr fwimFinalizeProc; // Proc that finalizes the FWIM.
- FWIMPollInterruptsProcPtr fwimPollInterruptsProc; // Proc that polls for interrupts.
- FWIMSendPhyPacketProcPtr fwimSendLinkOnPacketProc; // Proc that sends a link on packet.
- FWIMSendPhyPacketProcPtr fwimSendPhyConfigurationPacketProc; // Proc that sends a phy configuration packet.
- FWIMAsynchTransactionProcPtr
- fwimReadProc; // Proc that performs an asynchronous read transaction.
- FWIMSendAsynchResponsePacketProcPtr
- fwimReadResponseProc; // Proc that sends an asynchronous read response packet.
- FWIMAsynchTransactionProcPtr
- fwimWriteProc; // Proc that performs an asynchronous write transaction.
- FWIMSendAsynchResponsePacketProcPtr
- fwimWriteResponseProc; // Proc that sends an asynchronous write response packet.
- FWIMAsynchTransactionProcPtr
- fwimLockProc; // Proc that performs an asynchronous lock transaction.
- FWIMSendAsynchResponsePacketProcPtr
- fwimLockResponseProc; // Proc that sends an asynchronous lock response packet.
- FWIMAllocateIsochPortProcPtr
- fwimAllocateIsochPortProc; // Proc that allocates an isochronous port.
- FWIMReleaseIsochPortProcPtr fwimReleaseIsochPortProc; // Proc that releases an isochronous port.
- FWIMControlIsochPortProcPtr fwimStartIsochPortProc; // Proc that starts an isochronous port.
- FWIMControlIsochPortProcPtr fwimStopIsochPortProc; // Proc that stops an isochronous port.
- FWIMCommandProcPtr fwimResetBusProc; // Proc that initiates a FireWire bus reset.
- FWIMCommandProcPtr fwimSetContenderBitProc; // Proc that sets the contender bit.
- FWIMCommandProcPtr fwimClearContenderBitProc; // Proc that clears the contender bit.
- FWIMCommandProcPtr fwimEnableCycleMasterProc; // Proc that enables cycle mastering.
- FWIMCommandProcPtr fwimDisableCycleMasterProc; // Proc that disables cycle mastering.
- FWIMCommandProcPtr fwimSetRootHoldoffBitProc; // Proc that sets the root holdoff bit.
- FWIMCommandProcPtr fwimClearRootHoldoffBitProc; // Proc that clears the root holdoff bit.
- FWIMGetUniqueIDProcPtr fwimGetUniqueIDProc; // Proc that returns local unique ID.
- FWIMSetCSRROMProcPtr fwimSetCSRROMProc; // Proc that sets CSR ROM.
- FWIMDoLocalCompareSwapProcPtr fwimDoLocalCompareSwapProc; // Proc for hardware CS (OHCI IRM)
- FWIMSetAsynchFiltersProcPtr fwimSetAsynchFiltersProc; // Proc to set asynch and DMA filters
- FWIMSetFWIMStateProcPtr fwimSetFWIMStateProc; // Proc to put FWIM to sleep and/or quiesce it for replacement
- FWIMGetCycleTimeProcPtr fwimGetCycleTimeProc; // Proc to read cycle timer.
- };
- typedef struct FWIMPluginDispatchTableStruct
- FWIMPluginDispatchTable,
- *FWIMPluginDispatchTablePtr;
-
- typedef struct FWIMProcessParamsStruct
- FWIMProcessParams,
- *FWIMProcessParamsPtr;
-
- typedef void (FWIMProcessCompletionProc) (
- FWIMProcessParamsPtr pFWIMProcessParams);
- typedef FWIMProcessCompletionProc
- *FWIMProcessCompletionProcPtr;
-
- struct FWIMProcessParamsStruct
- {
- FWIMProcessParamsPtr pNextFWIMProcessParams; // Link to next set of params.
- UInt32 processType; // Type of processing.
- FWIMID fwimID; // Reference to calling FWIM.
- UInt32 processFlags; // Flag bits to control processing.
- UInt32 processState; // State bits of processing.
- UInt32 processStatus; // Final status of processing.
- FWIMProcessID fwimProcessID; // ID for this process.
- FWIMProcessCompletionProcPtr
- completionProc; // Proc to call upon completion of processing.
- UInt32 completionProcData; // Data provided and used by caller.
- };
-
- struct FWIMProcessSelfIDsParamsStruct
- {
- FWIMProcessParams fwimProcessParams; // Common processing params.
- UInt32 generation; // Bus generation of these self IDs.
- Ptr pSelfIDList; // List of self IDs.
- UInt32 selfIDListSize; // Size of above list in bytes.
- Ptr pLocalSelfID; // Local self ID if not included in above list.
- UInt32 localSelfIDSize; // Size of local self ID.
- UInt32 processSelfIDsFlags; // Flags controlling self ID processing.
- };
- typedef struct FWIMProcessSelfIDsParamsStruct
- FWIMProcessSelfIDsParams,
- *FWIMProcessSelfIDsParamsPtr;
-
- enum
- {
- kFWTransactionStatusAckCode = FWBitRange (28, 31),
- kFWTransactionStatusAckCodePhase = FWBitRangePhase (28, 31),
- kFWTransactionStatusSpeed = FWBitRange (26, 27),
- kFWTransactionStatusSpeedPhase = FWBitRangePhase (26, 27)
- };
-
- struct FWIMProcessAsynchParamsStruct
- {
- FWIMProcessParams fwimProcessParams; // Common processing params.
- AbsoluteTime timeStamp; // Time stamp marking arrival time of packet.
- UInt32 generation; // Topology map generation number when packet was received.
- Ptr receiveBuffer; // Buffer for data that we receive.
- UInt16 destinationID; // ID of destination node.
- UInt16 transactionDescriptor; // Descriptor for transaction.
- UInt16 sourceID; // ID of source node.
- UInt16 addressHi; // Destination address.
- UInt32 addressLo;
- UInt16 length; // Length of transaction.
- UInt16 extendedTCode; // Extended transaction code.
- UInt32 transactionStatus; // Status of transaction.
- };
- typedef struct FWIMProcessAsynchParamsStruct
- FWIMProcessAsynchParams,
- *FWIMProcessAsynchParamsPtr;
-
-
- ////////////////////////////////////////////////////////////////////////////////
- //
- // FireWire virtual device defs.
- //
-
- /*zzz should be in VirtualDevice.h */
- //zzz support multiple bus vdev??? (FW and SCSI vdev?)
- //
-
- enum
- {
- kVDeviceDescriptionSignature
- = 'vdei' // Virtual Device Export Information
- };
-
- enum
- {
- kVDeviceDescriptionVersion = 0x00010000
- };
-
- struct VDeviceDescriptionStruct
- {
- OSType vDeviceDescSignature; // Virtual Device Description signature.
- UInt32 vDeviceDescVersion; // Virtual Device Description version.
- UInt32 vDeviceDescSize; // Total size of this description.
- OSType vDeviceServiceCategory; // Service category of family providing interface to this
- // virtual device.
- };
- typedef struct VDeviceDescriptionStruct
- VDeviceDescription,
- *VDeviceDescriptionPtr;
-
- struct FWVDeviceDescriptionStruct
- {
- VDeviceDescription vDeviceDescription; // Universal Virtual Device description.
- UInt32 unitSpecID; // Unit Spec ID to present in unit directory (24-bit).
- UInt32 unitSWVersion; // Unit SW version to present in unit directory (24-bit).
- };
- typedef struct FWVDeviceDescriptionStruct
- FWVDeviceDescription,
- *FWVDeviceDescriptionPtr;
-
- /*zzz*/
-
- // Define FW virtual device proc names.
- #define FWVDeviceInstallProcPascalName "\pFWVDeviceInstall"
- #define FWVDeviceInterfaceProcPascalName "\pFWVDeviceInterface"
-
- struct FWVDeviceInstallParamsStruct
- {
- Ptr fwVDeviceSpecificData; // Data specific to virtual device.
- FWVDeviceID fwVDeviceID; // ID for this virtual device.
- CSRROMEntryID fwVDeviceCSRROMUnitDirID; // ID of the virtual device's CSR ROM unit directory.
- };
- typedef struct FWVDeviceInstallParamsStruct
- FWVDeviceInstallParams,
- *FWVDeviceInstallParamsPtr;
-
- typedef OSStatus
- (FWVDeviceInstallProc) (
- FWVDeviceInstallParamsPtr pFWVDeviceInstallParams);
- typedef FWVDeviceInstallProc *FWVDeviceInstallProcPtr;
-
-
- ////////////////////////////////////////////////////////////////////////////////
- //
- // FireWire protocol driver defs.
- //
-
- enum
- {
- kFWPDriverFileType = 'ndrv'
- };
-
- enum
- {
- kTheFWPDriverDescriptionSignature
- = 'pdei'
- };
-
- enum
- {
- kInitialFWPDriverDescriptor = 0
- };
-
- typedef UInt32 FWPDriverDescVersion;
- typedef OptionBits FWPDriverLoadingOptions;
-
- typedef OSStatus (FWPDriverUnitAddedProc) (
- FWPDriverID fwPDriverID,
- UInt32 fwPDriverSpecificData,
- FWUnitID fwUnitID);
- typedef FWPDriverUnitAddedProc
- *FWPDriverUnitAddedProcPtr;
-
- typedef OSStatus (FWPDriverUnitRemovedProc) (
- FWPDriverID fwPDriverID,
- UInt32 fwPDriverSpecificData,
- FWUnitID fwUnitID);
- typedef FWPDriverUnitRemovedProc
- *FWPDriverUnitRemovedProcPtr;
-
- struct FWPDriverProtocolStruct
- {
- UInt32 specID; // IDs specifying protocol.
- UInt32 swVersion;
- };
- typedef struct FWPDriverProtocolStruct
- FWPDriverProtocol,
- *FWPDriverProtocolPtr;
-
- struct FWPDriverTypeStruct
- {
- OSType fwPDriverServiceCategory; // Service category that this protocol driver communicates over.
- NumVersion fwPDriverVersion; // Protocol driver version number.
- };
- typedef struct FWPDriverTypeStruct
- FWPDriverType,
- *FWPDriverTypePtr;
-
- struct FWPDriverLoadingInfoStruct
- {
- FWPDriverLoadingOptions fwPDriverLoadingOptions; // Options for protocol driver loading.
- Str31 fwPDriverName; // Protocol driver's name when loading into the Name Registry.
- };
- typedef struct FWPDriverLoadingInfoStruct
- FWPDriverLoadingInfo,
- *FWPDriverLoadingInfoPtr;
-
- struct FWPDriverDescriptionStruct
- {
- OSType fwPDriverDescSignature; // Signature field of this structure.
- FWPDriverDescVersion fwPDriverDescVersion; // Version of this data structure.
- FWPDriverType fwPDriverType; // Type of protocol driver.
- FWPDriverLoadingInfo fwPDriverLoadingInfo; // Loading information for protocol driver.
- };
- typedef struct FWPDriverDescriptionStruct
- FWPDriverDescription,
- *FWPDriverDescriptionPtr;
-
-
- ////////////////////////////////////////////////////////////////////////////////
- //
- // FireWire Services defs.
- //
-
- // FireWire Services constants.
-
- enum
- {
- kFWCommandWaiting = 1,
- kFWCommandBusy = 2,
- kFWCommandComplete = 3
- };
-
- enum
- {
- kFWCommandSyncFlag = (1 << 0), // Perform command synchronously.
- kFWCommandPriorityFlag = (1 << 1), // This is a priority command.
- kFWCommandSynchronizeFlag = (1 << 2), // Wait for this command to complete before starting
- // subsequent commands.
- kFWCommandImmediateFlag = (1 << 3) // Perform command immediately.
- };
-
- enum
- {
- kInvalidFWNodeID = 0x7FFFFFFF,
- kInvalidFWGenerationNumber = 0x7FFFFFFF
- };
-
- enum
- {
- kIsochChannelActiveBit = (1 << 0), // Isochronous channel is active.
- kIsochChannelInitializedBit = (1 << 1), // Isochronous channel has been initialized.
- kIsochChannelBandwidthAllocatedBit = (1 << 2), // Bandwidth has been allocated for isochronous channel.
- kIsochChannelChannelAllocatedBit = (1 << 3), // Channel number has been allocated for isochronous channel.
- kIsochChannelAllocateOnResetBit = (1 << 4) // Resources must be reallocated on bus reset.
- };
-
- enum
- {
- kInvalidFWChannelNum = 0x7FFFFFFF
- };
-
-
- // Define FireWire service interface selectors.
-
- enum
- {
- kFWRead = 1, // Perform a read across the bus.
- kFWWrite = 2, // Perform a write across the bus.
- kFWCompareAndSwap = 3, // Perform a write across the bus.
- kFWSendFCPCommand = 4, // Send an FCP command and wait for response.
- kFWResetBus = 5, // Reset the FireWire bus.
- kFWBitAnd = 6, // Perform an atomic bitwise and.
- kFWBitOr = 7, // Perform an atomic bitwise or.
- kFWBitXor = 8, // Perform an atomic bitwise xor.
- kFWIncrement = 9, // Perform an atomic increment.
- kFWDecrement = 10, // Perform an atomic decrement.
- kFWAdd = 11, // Perform an atomic add.
- kFWThresholdAdd = 12, // Perform an atomic threshold add.
- kFWThresholdSubtract = 13, // Perform an atomic threshold subtract.
- kFWClippedAdd = 14, // Perform an atomic clipped add.
- kFWClippedSubtract = 15, // Perform an atomic clipped subtract.
- kFWInitializeIsochronousChannel = 16, // Initialize an isochronous channel.
- kFWReleaseIsochronousChannel = 17, // Release an isochronous channel.
- kFWStartIsochronousChannel = 18, // Start an isochronous channel.
- kFWStopIsochronousChannel = 19, // Stop an isochronous channel.
- kFWAllocateLocalIsochronousPort = 20, // Allocate a local isochronous port.
- kFWReleaseLocalIsochronousPort = 21, // Release a local isochronous port.
- kFWStartLocalIsochronousPort = 22, // Start a local isochronous port.
- kFWStopLocalIsochronousPort = 23, // Stop a local isochronous port.
- kFWSBP2Login = 24, // Serial Bus Protocol 2 API is
- kFWSBP2Logout = 25, // Just these four calls.
- kFWSBP2Append = 26,
- kFWSBP2Manage = 27,
- kFWChangePower = 28
- };
-
- enum
- {
- kFWBasicCommandObjectType = 1, // Type of FireWire command object for basic commands.
- kFWAsynchCommandObjectType = 2, // Type of FireWire command object for asynchronous transaction commands.
- kFWIsochChannelCommandObjectType = 3, // Type of FireWire command object for isoch channel commands.
- kFWIsochPortCommandObjectType = 4, // Type of FireWire command object for isoch port commands.
- kFWFCPCommandObjectType = 5, // Type of FireWire command object for FCP commands.
- kFWSBP2LoginCommandObjectType = 6, // For SBP-2 logins
- kFWSBP2NormalCommandObjectType = 7, // For SBP-2 Normal Command ORBs
- kFWSBP2ManagementCommandObjectType = 8, // For SBP-2 miscellaneous
- kFWPowerCommandObjectType = 9
- };
-
- // Flags for asynchronous command objects
-
- enum
- {
- kFWAsynchOverrideMaxPayload = (1 << 0), // Override max payload transfer flag.
- kFWAsynchDisableAddressIncrement
- = (1 << 1), // Disable auto incrementing of target addresses.
- kFWAsynchAbsoluteAddress = (1 << 2), // Use full 64-bit address.
- kFWAsynchFailOnBusReset = (1 << 3), // Fail asynchronous command if a bus reset occurs.
- kFWAsynchOverrideSpeed = (1 << 4) // Use client-specified speed no matter what.
- };
-
- // Flags for power command objects
-
- enum
- {
- kFWImpossiblePowerRequest = (1 << 0), // Set by FWChangePower
- kFWCanReducePowerOnRequest = (1 << 1), // Driver willing to spin-down, etc.
- kFWNotifyWhenPowerAvailable = (1 << 2) // Driver willing to try again later
- };
-
- // Event codes for cable power notification events
-
- enum
- {
- kFWCablePowerMayBeAvailable = 1, // Power requested earlier might be available
- kFWCablePowerDownRequest = 2, // Please reduce consumption if possible
- kFWCablePowerOffRequest = 3, // Please agree to zero power on bus
- kFWCablePowerOffNotify = 4, // Power is going down - be ready or else
- kFWCablePowerFailNotify = 5 // Power was lost unexpectedly
- };
-
- // FireWire service request type defs.
-
- typedef void (FWCommandCompletionProc) (
- FWCommandObjectID fwCommandObjectID,
- OSStatus commandStatus,
- UInt32 completionProcData);
- typedef FWCommandCompletionProc *FWCommandCompletionProcPtr;
-
- enum
- {
- kResponseDoneStatus = 0,
- kResponseContinueStatus = 1,
- kResponseUnrecognizedStatus = 2
- };
-
- typedef UInt32 (FCPResponseHandler) (
- FWCommandObjectID fwCommandObjectID,
- Ptr responseBuffer,
- UInt32 responseLength);
- typedef FCPResponseHandler *FCPResponseHandlerPtr;
-
- struct FWAddressStruct
- {
- UInt32 addressHi,
- addressLo;
- };
- typedef struct FWAddressStruct FWAddress, *FWAddressPtr;
-
-
- // FireWire Services procedure defs.
-
- OSStatus FWRegisterDriver (
- RegEntryIDPtr pFWDriverRegEntry,
- FWDriverID *pFWDriverID,
- CSRROMEntryID *pCSRUnitID,
- UInt32 fwDriverSpecificData);
-
- OSStatus FWUnregisterDriver (
- FWDriverID fwDriverID);
-
- OSStatus FWRegisterProtocolDriver (
- RegEntryIDPtr pFWPDriverRegEntry,
- FWPDriverID *pFWPDriverID,
- UInt32 fwPDriverSpecificData);
-
- OSStatus FWUnregisterProtocolDriver (
- FWPDriverID fwPDriverID);
-
- OSStatus FWScanUnitsForFWPDriver (
- FWPDriverID fwPDriverID);
-
- OSStatus FWSetPDriverProtocolTable (
- FWPDriverID fwPDriverID,
- FWPDriverProtocolPtr fwPDriverProtocolTable,
- UInt32 tableSize);
-
- OSStatus FWGetPDriverProtocolTable (
- FWPDriverID fwPDriverID,
- FWPDriverProtocolPtr fwPDriverProtocolTable,
- UInt32 *pTableSize,
- UInt32 maxTableSize);
-
- OSStatus FWSetFWPDriverUnitAddedProc (
- FWPDriverID fwPDriverID,
- FWPDriverUnitAddedProcPtr fwPDriverUnitAddedProc);
-
- OSStatus FWGetFWPDriverUnitAddedProc (
- FWPDriverID fwPDriverID,
- FWPDriverUnitAddedProcPtr *pFWPDriverUnitAddedProc);
-
- OSStatus FWSetFWPDriverUnitRemovedProc (
- FWPDriverID fwPDriverID,
- FWPDriverUnitRemovedProcPtr fwPDriverUnitRemovedProc);
-
- OSStatus FWGetFWPDriverUnitRemovedProc (
- FWPDriverID fwPDriverID,
- FWPDriverUnitRemovedProcPtr *pFWPDriverUnitRemovedProc);
-
- OSStatus FWRegisterFSSpecPDriver (
- FSSpecPtr pFWPDriverFSSpec);
-
- OSStatus FWRegisterFSSpecResourcePDriver (
- FSSpecPtr pFWPDriverFSSpec,
- ResType fwPDriverResType,
- short fwPDriverResID);
-
- OSStatus FWAddUnitConnection (
- FWUnitID fwUnitID,
- FWReferenceID fwReferenceID);
-
- OSStatus FWRemoveUnitConnection (
- FWUnitID fwUnitID,
- FWReferenceID fwReferenceID);
-
- OSStatus FWSetFWClientResetNotifyProc (
- FWReferenceID fwReferenceID,
- FWClientResetNotifyProcPtr fwClientResetNotifyProc);
-
- OSStatus FWGetFWClientResetNotifyProc (
- FWReferenceID fwReferenceID,
- FWClientResetNotifyProcPtr *pFWClientResetNotifyProc);
-
- OSStatus FWSetFWClientBusManagementNotifyProc (
- FWReferenceID fwReferenceID,
- FWClientResetNotifyProcPtr fwClientResetNotifyProc);
-
- OSStatus FWGetFWClientBusManagementNotifyProc (
- FWReferenceID fwReferenceID,
- FWClientResetNotifyProcPtr *pFWClientResetNotifyProc);
-
- OSStatus FWSetFWClientReadRequestProc (
- FWReferenceID fwReferenceID,
- FWClientReadProcPtr fwClientReadRequestProc);
-
- OSStatus FWGetFWClientReadRequestProc (
- FWReferenceID fwReferenceID,
- FWClientReadProcPtr *pFWClientReadRequestProc);
-
- OSStatus FWSetFWClientReadCompleteProc (
- FWReferenceID fwReferenceID,
- FWClientReadProcPtr fwClientReadCompleteProc);
-
- OSStatus FWGetFWClientReadCompleteProc (
- FWReferenceID fwReferenceID,
- FWClientReadProcPtr *pFWClientReadCompleteProc);
-
- OSStatus FWSetFWClientWriteRequestProc (
- FWReferenceID fwReferenceID,
- FWClientWriteProcPtr fwClientWriteRequestProc);
-
- OSStatus FWGetFWClientWriteRequestProc (
- FWReferenceID fwReferenceID,
- FWClientWriteProcPtr *pFWClientWriteRequestProc);
-
- OSStatus FWSetFWClientWriteCompleteProc (
- FWReferenceID fwReferenceID,
- FWClientWriteProcPtr fwClientWriteCompleteProc);
-
- OSStatus FWGetFWClientWriteCompleteProc (
- FWReferenceID fwReferenceID,
- FWClientWriteProcPtr *pFWClientWriteCompleteProc);
-
- OSStatus FWSetFWClientLockRequestProc (
- FWReferenceID fwReferenceID,
- FWClientLockProcPtr fwClientLockRequestProc);
-
- OSStatus FWGetFWClientLockRequestProc (
- FWReferenceID fwReferenceID,
- FWClientLockProcPtr *pFWClientLockRequestProc);
-
- OSStatus FWSetFWClientLockCompleteProc (
- FWReferenceID fwReferenceID,
- FWClientLockProcPtr fwClientLockCompleteProc);
-
- OSStatus FWGetFWClientLockCompleteProc (
- FWReferenceID fwReferenceID,
- FWClientLockProcPtr *pFWClientLockCompleteProc);
-
- OSStatus FWSetFWClientInitIsochPortProc (
- FWReferenceID fwReferenceID,
- FWClientInitIsochPortProcPtr
- fwClientInitIsochPortProc);
-
- OSStatus FWGetFWClientInitIsochPortProc (
- FWReferenceID fwReferenceID,
- FWClientInitIsochPortProcPtr
- *pFWClientInitIsochPortProc);
-
- OSStatus FWSetFWClientReleaseIsochPortProc (
- FWReferenceID fwReferenceID,
- FWClientReleaseIsochPortProcPtr
- fwClientReleaseIsochPortProc);
-
- OSStatus FWGetFWClientReleaseIsochPortProc (
- FWReferenceID fwReferenceID,
- FWClientReleaseIsochPortProcPtr
- *pFWClientReleaseIsochPortProc);
-
- OSStatus FWSetFWClientStartIsochPortProc (
- FWReferenceID fwReferenceID,
- FWClientStartIsochPortProcPtr
- fwClientStartIsochPortProc);
-
- OSStatus FWGetFWClientStartIsochPortProc (
- FWReferenceID fwReferenceID,
- FWClientStartIsochPortProcPtr
- *pFWClientStartIsochPortProc);
-
- OSStatus FWSetFWClientStopIsochPortProc (
- FWReferenceID fwReferenceID,
- FWClientStopIsochPortProcPtr
- fwClientStopIsochPortProc);
-
- OSStatus FWGetFWClientStopIsochPortProc (
- FWReferenceID fwReferenceID,
- FWClientStopIsochPortProcPtr
- *pFWClientStopIsochPortProc);
-
- OSStatus FWSetFWClientPowerNotifyProc (
- FWReferenceID fwReferenceID,
- FWClientPowerNotifyProcPtr fwClientPowerNotifyProc);
-
- OSStatus FWGetFWClientPowerNotifyProc (
- FWReferenceID fwReferenceID,
- FWClientPowerNotifyProcPtr *pFWClientPowerNotifyProc);
-
- TaskID FWCurrentTaskID (void);
-
- OSStatus FWCreateSoftwareInterrupt (
- SoftwareInterruptHandler theHandler,
- TaskID theTask,
- void *theParameter,
- Boolean persistent,
- SoftwareInterruptID *theSoftwareInterrupt);
-
- OSStatus FWSendSoftwareInterrupt (
- SoftwareInterruptID theSoftwareInterrupt,
- void *theParameter);
-
- OSStatus FWDeleteSoftwareInterrupt (
- SoftwareInterruptID theSoftwareInterrupt);
-
- OSStatus FWAllocateFWCommandObject (
- FWCommandObjectID *pFWCommandObjectID);
-
- OSStatus FWGetFWCommandObjectType (
- FWCommandObjectID fwCommandObjectID,
- UInt32 *pFWCommandObjectType);
-
- OSStatus FWGetFWCommandType (
- FWCommandObjectID fwCommandObjectID,
- UInt32 *pCommandType);
-
- OSStatus FWSetFWCommandFWReferenceID (
- FWCommandObjectID fwCommandObjectID,
- FWReferenceID fwReferenceID);
-
- OSStatus FWGetFWCommandFWReferenceID (
- FWCommandObjectID fwCommandObjectID,
- FWReferenceID *pFWReferenceID);
-
- OSStatus FWSetFWCommandFlags (
- FWCommandObjectID fwCommandObjectID,
- UInt32 commandFlags);
-
- OSStatus FWGetFWCommandFlags (
- FWCommandObjectID fwCommandObjectID,
- UInt32 *pCommandFlags);
-
- OSStatus FWGetFWCommandStatus (
- FWCommandObjectID fwCommandObjectID,
- OSStatus *pCommandStatus);
-
- OSStatus FWSetFWCommandCompletionProc (
- FWCommandObjectID fwCommandObjectID,
- FWCommandCompletionProcPtr completionProc);
-
- OSStatus FWGetFWCommandCompletionProc (
- FWCommandObjectID fwCommandObjectID,
- FWCommandCompletionProcPtr *pCompletionProc);
-
- OSStatus FWSetFWCommandCompletionProcData (
- FWCommandObjectID fwCommandObjectID,
- UInt32 completionProcData);
-
- OSStatus FWGetFWCommandCompletionProcData (
- FWCommandObjectID fwCommandObjectID,
- UInt32 *pCompletionProcData);
-
- OSStatus FWSetFWCommandParams (
- FWCommandObjectID fwCommandObjectID,
- FWReferenceID fwReferenceID,
- UInt32 commandFlags,
- FWCommandCompletionProcPtr completionProc,
- UInt32 completionProcData);
-
- OSStatus FWGetFWCommandParams (
- FWCommandObjectID fwCommandObjectID,
- UInt32 *pFWCommandObjectType,
- UInt32 *pCommandType,
- FWReferenceID *pFWReferenceID,
- UInt32 *pCommandFlags,
- OSStatus *pCommandStatus,
- FWCommandCompletionProcPtr *pCompletionProc,
- UInt32 *pCompletionProcData);
-
- OSStatus FWDeallocateFWCommandObject (
- FWCommandObjectID fwCommandObjectID);
-
- OSStatus FWGetTopologyMap (
- FWReferenceID fwReferenceID,
- FWTopologyMapPtr pFWTopologyMap);
-
- OSStatus FWAllocateAsynchCommandObject (
- FWCommandObjectID *pFWCommandObjectID);
-
- OSStatus FWSetAsynchCommandGeneration (
- FWCommandObjectID fwCommandObjectID,
- UInt32 generation);
-
- OSStatus FWGetAsynchCommandGeneration (
- FWCommandObjectID fwCommandObjectID,
- UInt32 *pGeneration);
-
- OSStatus FWSetAsynchCommandAddress (
- FWCommandObjectID fwCommandObjectID,
- UInt32 addressHi,
- UInt32 addressLo);
-
- OSStatus FWGetAsynchCommandAddress (
- FWCommandObjectID fwCommandObjectID,
- UInt32 *pAddressHi,
- UInt32 *pAddressLo);
-
- OSStatus FWSetAsynchCommandBuffer (
- FWCommandObjectID fwCommandObjectID,
- Ptr buffer);
-
- OSStatus FWGetAsynchCommandBuffer (
- FWCommandObjectID fwCommandObjectID,
- Ptr *pBuffer);
-
- OSStatus FWSetAsynchCommandLength (
- FWCommandObjectID fwCommandObjectID,
- UInt32 length);
-
- OSStatus FWGetAsynchCommandLength (
- FWCommandObjectID fwCommandObjectID,
- UInt32 *pLength);
-
- OSStatus FWSetAsynchCommandBytesTransferred (
- FWCommandObjectID fwCommandObjectID,
- UInt32 bytesTransferred);
-
- OSStatus FWGetAsynchCommandBytesTransferred (
- FWCommandObjectID fwCommandObjectID,
- UInt32 *pBytesTransferred);
-
- OSStatus FWSetAsynchCommandMaxPayloadSize (
- FWCommandObjectID fwCommandObjectID,
- UInt32 maxPayloadSize);
-
- OSStatus FWGetAsynchCommandMaxPayloadSize (
- FWCommandObjectID fwCommandObjectID,
- UInt32 *pMaxPayloadSize);
-
- OSStatus FWSetAsynchCommandMaxRetries (
- FWCommandObjectID fwCommandObjectID,
- UInt32 maxRetries);
-
- OSStatus FWGetAsynchCommandMaxRetries (
- FWCommandObjectID fwCommandObjectID,
- UInt32 *pMaxRetries);
-
- OSStatus FWSetAsynchCommandTransferFlags (
- FWCommandObjectID fwCommandObjectID,
- UInt32 transferFlags);
-
- OSStatus FWGetAsynchCommandTransferFlags (
- FWCommandObjectID fwCommandObjectID,
- UInt32 *pTransferFlags);
-
- OSStatus FWSetAsynchCommandSpeed (
- FWCommandObjectID fwCommandObjectID,
- UInt32 speed);
-
- OSStatus FWGetAsynchCommandSpeed (
- FWCommandObjectID fwCommandObjectID,
- UInt32 *pSpeed);
-
- OSStatus FWSetAsynchCommandParams (
- FWCommandObjectID fwCommandObjectID,
- UInt32 generation,
- UInt32 addressHi,
- UInt32 addressLo,
- Ptr buffer,
- UInt32 length,
- UInt32 maxPayloadSize,
- UInt32 maxRetries,
- UInt32 transferFlags);
-
- OSStatus FWGetAsynchCommandParams (
- FWCommandObjectID fwCommandObjectID,
- UInt32 *pGeneration,
- UInt32 *pAddressHi,
- UInt32 *pAddressLo,
- Ptr *pBuffer,
- UInt32 *pLength,
- UInt32 *pBytesTransferred,
- UInt32 *pMaxPayloadSize,
- UInt32 *pMaxRetries,
- UInt32 *pTransferFlags);
-
- OSStatus FWSetCommonAsynchCommandParams (
- FWCommandObjectID fwCommandObjectID,
- UInt32 addressHi,
- UInt32 addressLo,
- Ptr buffer,
- UInt32 length);
-
- OSStatus FWGetCommonAsynchCommandParams (
- FWCommandObjectID fwCommandObjectID,
- Ptr *pBuffer,
- UInt32 *pLength,
- UInt32 *pBytesTransferred);
-
- OSStatus FWRead (
- FWCommandObjectID fwCommandObjectID);
-
- OSStatus FWWrite (
- FWCommandObjectID fwCommandObjectID);
-
- OSStatus FWCompareAndSwap (
- FWCommandObjectID fwCommandObjectID);
-
- OSStatus FWBitAnd (
- FWCommandObjectID fwCommandObjectID);
-
- OSStatus FWBitOr (
- FWCommandObjectID fwCommandObjectID);
-
- OSStatus FWBitXor (
- FWCommandObjectID fwCommandObjectID);
-
- OSStatus FWIncrement (
- FWCommandObjectID fwCommandObjectID);
-
- OSStatus FWDecrement (
- FWCommandObjectID fwCommandObjectID);
-
- OSStatus FWAdd (
- FWCommandObjectID fwCommandObjectID);
-
- OSStatus FWThresholdAdd (
- FWCommandObjectID fwCommandObjectID);
-
- OSStatus FWThresholdSubtract (
- FWCommandObjectID fwCommandObjectID);
-
- OSStatus FWClippedAdd (
- FWCommandObjectID fwCommandObjectID);
-
- OSStatus FWClippedSubtract (
- FWCommandObjectID fwCommandObjectID);
-
- OSStatus FWSendFCPCommand (
- FWCommandObjectID fwCommandObjectID);
-
- OSStatus FWAllocateFCPCommandObject (
- FWCommandObjectID *pFWCommandObjectID);
-
- OSStatus FWSetFCPCommandCommandBuffer (
- FWCommandObjectID fwCommandObjectID,
- Ptr commandBuffer);
-
- OSStatus FWGetFCPCommandCommandBuffer (
- FWCommandObjectID fwCommandObjectID,
- Ptr *pCommandBuffer);
-
- OSStatus FWSetFCPCommandCommandLength (
- FWCommandObjectID fwCommandObjectID,
- UInt32 commandLength);
-
- OSStatus FWGetFCPCommandCommandLength (
- FWCommandObjectID fwCommandObjectID,
- UInt32 *pCommandLength);
-
- OSStatus FWSetFCPCommandResponseBuffer (
- FWCommandObjectID fwCommandObjectID,
- Ptr responseBuffer);
-
- OSStatus FWGetFCPCommandResponseBuffer (
- FWCommandObjectID fwCommandObjectID,
- Ptr *pResponseBuffer);
-
- OSStatus FWSetFCPCommandResponseBufferSize (
- FWCommandObjectID fwCommandObjectID,
- UInt32 responseBufferSize);
-
- OSStatus FWGetFCPCommandResponseBufferSize (
- FWCommandObjectID fwCommandObjectID,
- UInt32 *pResponseBufferSize);
-
- OSStatus FWSetFCPCommandResponseLength (
- FWCommandObjectID fwCommandObjectID,
- UInt32 responseLength);
-
- OSStatus FWGetFCPCommandResponseLength (
- FWCommandObjectID fwCommandObjectID,
- UInt32 *pResponseLength);
-
- OSStatus FWSetFCPCommandTimeout (
- FWCommandObjectID fwCommandObjectID,
- Duration timeout);
-
- OSStatus FWGetFCPCommandTimeout (
- FWCommandObjectID fwCommandObjectID,
- Duration *pTimeout);
-
- OSStatus FWSetFCPCommandMaxRetries (
- FWCommandObjectID fwCommandObjectID,
- UInt32 maxRetries);
-
- OSStatus FWGetFCPCommandMaxRetries (
- FWCommandObjectID fwCommandObjectID,
- UInt32 *pMaxRetries);
-
- OSStatus FWSetFCPCommandTransferFlags (
- FWCommandObjectID fwCommandObjectID,
- UInt32 transferFlags);
-
- OSStatus FWGetFCPCommandTransferFlags (
- FWCommandObjectID fwCommandObjectID,
- UInt32 *pTransferFlags);
-
- OSStatus FWSetFCPCommandResponseHandler (
- FWCommandObjectID fwCommandObjectID,
- FCPResponseHandlerPtr fcpResponseHandler);
-
- OSStatus FWGetFCPCommandResponseHandler (
- FWCommandObjectID fwCommandObjectID,
- FCPResponseHandlerPtr *pFCPResponseHandler);
-
- OSStatus FWSetFCPCommandParams (
- FWCommandObjectID fwCommandObjectID,
- Ptr commandBuffer,
- UInt32 commandLength,
- Ptr responseBuffer,
- UInt32 responseBufferSize,
- Duration timeout,
- UInt32 maxRetries,
- UInt32 transferFlags,
- FCPResponseHandlerPtr fcpResponseHandler);
-
- OSStatus FWGetFCPCommandParams (
- FWCommandObjectID fwCommandObjectID,
- Ptr *pCommandBuffer,
- UInt32 *pCommandLength,
- Ptr *pResponseBuffer,
- UInt32 *pResponseBufferSize,
- UInt32 *pResponseLength,
- Duration *pTimeout,
- UInt32 *pMaxRetries,
- UInt32 *pTransferFlags,
- FCPResponseHandlerPtr *pFCPResponseHandler);
-
- OSStatus FWResetBus (
- FWCommandObjectID fwCommandObjectID);
-
- OSStatus FWAllocateIsochronousChannelID (
- IsochChannelID *pIsochChannelID,
- Boolean doIRMAllocation,
- UInt32 bandwidth,
- UInt32 preferredSpeed);
-
- OSStatus FWDeallocateIsochronousChannelID (
- IsochChannelID isochChannelID);
-
- OSStatus FWAddIsochronousChannelClient (
- IsochChannelID isochChannelID,
- FWReferenceID fwReferenceID,
- UInt32 refCon,
- Boolean clientIsTalker);
-
- OSStatus FWSetIsochChannelForceStopNotificationProc (
- IsochChannelID isochChannelID,
- FWIsochChannelForceStopNotificationProcPtr
- fwIsochChannelForceStopNotificationProc);
-
- OSStatus FWInitializeIsochronousChannel (
- FWCommandObjectID fwCommandObjectID);
-
- OSStatus FWReleaseIsochronousChannel (
- FWCommandObjectID fwCommandObjectID);
-
- OSStatus FWStartIsochronousChannel (
- FWCommandObjectID fwCommandObjectID);
-
- OSStatus FWStopIsochronousChannel (
- FWCommandObjectID fwCommandObjectID);
-
- OSStatus FWAllocateIsochChannelCommandObject (
- FWCommandObjectID *pFWCommandObjectID);
-
- OSStatus FWSetIsochChannelCommandIsochChannelID (
- FWCommandObjectID fwCommandObjectID,
- IsochChannelID isochChannelID);
-
- OSStatus FWGetIsochChannelCommandIsochChannelID (
- FWCommandObjectID fwCommandObjectID,
- IsochChannelID *pIsochChannelID);
-
- OSStatus FWCreateDCLProgram (
- DCLProgramID *pDCLProgramID);
-
- OSStatus FWDisposeDCLProgram (
- DCLProgramID dclProgramID);
-
- OSStatus FWSetDCLProgramStart (
- DCLProgramID dclProgramID,
- DCLCommandPtr pDCLStart);
-
- OSStatus FWGetDCLProgramStart (
- DCLProgramID dclProgramID,
- DCLCommandPtr *ppDCLStart);
-
- OSStatus FWSetDCLProgramEngineData (
- DCLProgramID dclProgramID,
- UInt32 dclEngineData);
-
- OSStatus FWGetDCLProgramEngineData (
- DCLProgramID dclProgramID,
- UInt32 *pDCLEngineData);
-
- OSStatus FWSetDCLProgramStartProc (
- DCLProgramID dclProgramID,
- DCLProgramStartProcPtr dclProgramStartProc);
-
- OSStatus FWGetDCLProgramStartProc (
- DCLProgramID dclProgramID,
- DCLProgramStartProcPtr *pDCLProgramStartProc);
-
- OSStatus FWSetDCLProgramStopProc (
- DCLProgramID dclProgramID,
- DCLProgramStopProcPtr dclProgramStopProc);
-
- OSStatus FWGetDCLProgramStopProc (
- DCLProgramID dclProgramID,
- DCLProgramStopProcPtr *pDCLProgramStopProc);
-
- OSStatus FWSetDCLProgramReleaseProc (
- DCLProgramID dclProgramID,
- DCLProgramReleaseProcPtr dclProgramReleaseProc);
-
- OSStatus FWGetDCLProgramReleaseProc (
- DCLProgramID dclProgramID,
- DCLProgramReleaseProcPtr *pDCLProgramReleaseProc);
-
- OSStatus FWSetDCLProgramCompilerNotificationProc (
- DCLProgramID dclProgramID,
- DCLCompilerNotificationProcPtr
- dclCompilerNotificationProc);
-
- OSStatus FWGetDCLProgramCompilerNotificationProc (
- DCLProgramID dclProgramID,
- DCLCompilerNotificationProcPtr
- *pDCLCompilerNotificationProc);
-
- OSStatus FWSetDCLProgramChannelNum (
- DCLProgramID dclProgramID,
- UInt32 channelNum);
-
- OSStatus FWGetDCLProgramChannelNum (
- DCLProgramID dclProgramID,
- UInt32 *pChannelNum);
-
- OSStatus FWSetDCLProgramTalking (
- DCLProgramID dclProgramID,
- Boolean talking);
-
- OSStatus FWGetDCLProgramTalking (
- DCLProgramID dclProgramID,
- Boolean *pTalking);
-
- OSStatus FWSetDCLProgramStartEvent (
- DCLProgramID dclProgramID,
- UInt32 startEvent,
- UInt32 startEventState,
- UInt32 startEventStateMask);
-
- OSStatus FWGetDCLProgramStartEvent (
- DCLProgramID dclProgramID,
- UInt32 *pStartEvent,
- UInt32 *pStartEventState,
- UInt32 *pStartEventStateMask);
-
- OSStatus FWTranslateDCLProgram (
- DCLProgramID dclProgramID,
- DCLProgramID *pTranslatedDCLProgramID);
-
- OSStatus FWStartDCLProgram (
- DCLProgramID dclProgramID);
-
- OSStatus FWStopDCLProgram (
- DCLProgramID dclProgramID);
-
- OSStatus FWReleaseDCLProgram (
- DCLProgramID dclProgramID);
-
- OSStatus FWUpdateDCLList (
- DCLProgramID dclProgramID,
- DCLCommandPtr *dclCommandList,
- UInt32 numDCLCommands);
-
- OSStatus FWModifyDCLList (
- DCLProgramID dclProgramID,
- DCLCommandPtr *dclCommandList,
- UInt32 numDCLCommands);
-
- OSStatus FWModifyDCLJump (
- DCLProgramID dclProgramID,
- DCLJumpPtr pDCLJump,
- DCLLabelPtr pDCLLabel);
-
- OSStatus FWCallDCLCallProc (
- DCLProgramID dclProgramID,
- DCLCallProcPtr pDCLCallProc);
-
- OSStatus FWAllocateIsochPortID (
- IsochPortID *pIsochPortID,
- DCLProgramID dclProgramID,
- UInt32 channelNum,
- UInt32 speed,
- Boolean talking);
-
- OSStatus FWDeallocateIsochPortID (
- IsochPortID isochPortID);
-
- OSStatus FWAllocateLocalIsochronousPort (
- FWCommandObjectID fwCommandObjectID);
-
- OSStatus FWReleaseLocalIsochronousPort (
- FWCommandObjectID fwCommandObjectID);
-
- OSStatus FWStartLocalIsochronousPort (
- FWCommandObjectID fwCommandObjectID);
-
- OSStatus FWStopLocalIsochronousPort (
- FWCommandObjectID fwCommandObjectID);
-
- OSStatus FWContinueLocalIsochronousPort (
- FWCommandObjectID fwCommandObjectID);
-
- OSStatus FWAllocateIsochPortCommandObject (
- FWCommandObjectID *pFWCommandObjectID);
-
- OSStatus FWSetIsochPortCommandIsochPortID (
- FWCommandObjectID fwCommandObjectID,
- IsochPortID isochPortID);
-
- OSStatus FWGetIsochPortCommandIsochPortID (
- FWCommandObjectID fwCommandObjectID,
- IsochPortID *pIsochPortID);
-
- OSStatus FWCSRROMGetRootDirectory (
- FWReferenceID fwReferenceID,
- CSRROMEntryID *pCSRROMEntryID);
-
- OSStatus FWCSRROMGetEntryAddress (
- CSRROMEntryID csrROMEntryID,
- UInt32 *pAddress);
-
- OSStatus FWCSRROMGetEntryDataAddress (
- CSRROMEntryID csrROMEntryID,
- UInt32 *pAddress);
-
- OSStatus FWCSRROMCreateEntry (
- CSRROMEntryID parentCSRROMEntryID,
- CSRROMEntryID *pCSRROMEntryID,
- UInt32 entryType,
- UInt32 entryKeyValue,
- void *entryData,
- UInt32 entrySize);
-
- OSStatus FWCSRROMDisposeEntry (
- CSRROMEntryID csrROMEntryID);
-
- OSStatus FWCSRROMInstantiate (
- FWReferenceID fwReferenceID);
-
- OSStatus FWCSRROMCreateIterator (
- CSRROMEntryIterator *pCSRROMIterator,
- FWReferenceID fwReferenceID);
-
- void FWCSRROMDisposeIterator (
- CSRROMEntryIterator csrROMIterator);
-
- OSStatus FWCSRROMSetIterator (
- CSRROMEntryIterator csrROMIterator,
- CSRROMEntryID csrROMEntryID,
- CSRROMIterationOp relationship);
-
- OSStatus FWCSRROMEntrySearch (
- CSRROMEntryIterator csrROMIterator,
- CSRROMIterationOp relationship,
- CSRROMEntryID *pEntryID,
- Boolean *pDone,
- CSRROMSearchCriteriaPtr pSearchCriteria,
- Ptr pEntryValue,
- UInt32 *pEntrySize);
-
- CSRROMEntryID FWCSRROMCreateEntryID (void);
-
- void FWCSRROMDisposeEntryID (
- CSRROMEntryID csrROMEntryID);
-
- OSStatus FWCSRROMCopyEntryID (
- CSRROMEntryID srcCSRROMEntryID,
- CSRROMEntryID *pDstCSRROMEntryID);
-
- OSStatus FWCSRROMCompareEntryIDs (
- CSRROMEntryID csrROMEntryID1,
- CSRROMEntryID csrROMEntryID2,
- Boolean *pCSRROMEntryIDsEqual);
-
- void FWCSRROMInvalidateEntryIDType (
- CSRROMEntryID csrROMEntryID);
-
- OSStatus FWAllocateAddressSpace (
- FWAddressSpaceID *pFWAddressSpaceID,
- FWReferenceID fwReferenceID,
- FWAddressPtr pFWAddress,
- UInt32 size,
- Ptr addressBuffer,
- UInt32 addressFlags,
- Ptr pAddressSpecificData);
-
- OSStatus FWDeallocateAddressSpace (
- FWAddressSpaceID fwAddressSpaceID);
-
- OSStatus FWProcessReadRequest (
- FWIMProcessAsynchParamsPtr pFWIMProcessAsynchParams);
-
- OSStatus FWProcessWriteRequest (
- FWIMProcessAsynchParamsPtr pFWIMProcessAsynchParams);
-
- OSStatus FWProcessLockRequest (
- FWIMProcessAsynchParamsPtr pFWIMProcessAsynchParams);
-
- OSStatus FWGetLocalFWReferenceIDFromFWReferenceID (
- FWReferenceID fwReferenceID,
- FWReferenceID *pLocalFWReferenceID);
-
- OSStatus FWGetFWDeviceIDFromFWReferenceID (
- FWReferenceID fwReferenceID,
- FWDeviceID *pFWDeviceID);
-
- OSStatus FWFindFWDeviceFromNodeID (
- FWReferenceID fwReferenceID,
- UInt32 generation,
- UInt32 nodeID,
- FWDeviceID *pFWDeviceID);
-
- OSStatus FWGetNodeID (
- FWReferenceID fwReferenceID,
- UInt32 *pNodeID,
- UInt32 *pGenerationNumber);
-
- OSStatus FWGetUniqueID (
- FWReferenceID fwReferenceID,
- CSRNodeUniqueIDPtr pUniqueID);
-
- OSStatus FWGetUnitCSRROMEntryID (
- FWReferenceID fwReferenceID,
- CSRROMEntryID *pUnitCSRROMEntryID);
-
- OSStatus FWGetFWIsochResourceManagerID (
- FWReferenceID fwReferenceID,
- FWIsochResourceManagerID *pFWIsochResourceManagerID);
-
- OSStatus FWSetMaxPayloadSize (
- FWReferenceID fwReferenceID,
- UInt32 maxPayloadSize);
-
- OSStatus FWClientCommandIsComplete (
- FWClientCommandID fwClientCommandID,
- OSStatus commandStatus);
-
- OSStatus FWIMCommandIsComplete (
- FWIMCommandID fwimCommandID,
- OSStatus commandStatus);
-
- OSStatus FWProcessBusReset (
- FWIMID fwimID);
-
- void FWProcessSelfIDs (
- FWIMProcessSelfIDsParamsPtr pFWIMProcessSelfIDsParams);
-
- OSStatus FWCreateDeferredTask (
- FWDeferredTaskID *pFWDeferredTaskID,
- FWDeferredTaskProcPtr fwDeferredTaskProc,
- void *param1);
-
- OSStatus FWDisposeDeferredTask (
- FWDeferredTaskID fwDeferredTaskID);
-
- OSStatus FWScheduleDeferredTask (
- FWDeferredTaskID fwDeferredTaskID,
- void *param2);
-
- OSStatus FWGetCycleTime (
- FWReferenceID fwReferenceID,
- UInt32 *pCycleTime);
-
- OSStatus FWAllocatePhysicalAddressSpace (
- FWAddressSpaceID *pFWAddressSpaceID,
- FWReferenceID fwReferenceID,
- IOPreparationTable *pIOPreparationTable);
-
- OSStatus FWInstallNewFWIM (
- RegEntryIDPtr pFWIMRegEntry);
-
- OSStatus FWAllocatePowerCommandObject(
- FWCommandObjectID *pFWCommandObjectID);
-
- OSStatus FWSetPowerCommandParams(
- FWCommandObjectID fwCommandObjectID,
- UInt32 minimumDeciVolts,
- UInt32 totalDeciWattsRequested,
- UInt32 totalDeciWattsAllocated,
- UInt32 powerFlags);
-
- OSStatus FWGetPowerCommandParams(
- FWCommandObjectID fwCommandObjectID,
- UInt32 *pMinimumDeciVolts,
- UInt32 *pTotalDeciWattsRequested,
- UInt32 *pTotalDeciWattsAllocated,
- UInt32 *pPowerFlags);
-
- OSStatus FWChangePower (
- FWCommandObjectID fwCommandObjectID);
-
- void FWWaitForDeviceRePlug(
- FWCommandObjectID fwCommandObjectID );
-
- // We need to make this file a .i file so future direction stuff can be
- // added without worries of it being distributed...
- #if forVMBackingStore
-
- void FWIMEnableVMUserCode( void );
- void FWIMDisableVMUserCode( void );
-
- #else
-
- #define FWIMEnableVMUserCode()
- #define FWIMDisableVMUserCode()
-
- #endif
-
- //zzz Put in Devices.h
-
- /* Categories */
-
- enum {
- kServiceCategoryFWIM = 'fwim', /* FireWire interface module */
- kServiceCategoryFWDriver = 'fwdv' /* FireWire device driver */
- };
-
- // End - Put in Devices.h
-
- //zzz Put in Errors.h
-
- enum {
- inUseErr = -4160, // Item already in use
- notFoundErr = -4161, // Item not found
- timeoutErr = -4162, // Something timed out
- busReconfiguredErr = -4163, // Bus was reconfigured
- insufficientBandwidthErr = -4164, // Not enough bandwidth was available
- invalidIDErr = -4165, // Given ID is not valid.
- invalidIDTypeErr = -4166, // Given ID is of an invalid type for the requested operation.
- accessErr = -4167, // Requested access not allowed.
- alreadyRegisteredErr = -4168, // Item has already been registered.
- disconnectedErr = -4169, // Target of request has been disconnected.
- retryExceededErr = -4170, // Retry limit was exceeded.
- addressRangeErr = -4171, // Address is not in range.
- addressAlignmentErr = -4172, // Address is not of proper alignment.
-
- multipleTalkerErr = -4180, // Tried to install multiple talkers
- channelActiveErr = -4181, // Operation not permitted when channel is active
- noListenerOrTalkerErr = -4182, // Every isochronous channel must have one talker and at least
- // one listener
- noChannelsAvailableErr = -4183, // No supported isochronous channels are available
- channelNotAvailableErr = -4184, // Required channel was not available.
- invalidIsochPortIDErr = -4185, // An isochronous port ID is invalid.
- invalidFWReferenceTypeErr = -4186, // Operation does not support type of given reference ID
- separateBusErr = -4187, // Two or more entities are on two or more busses and cannot be associated with eachother.
- badSelfIDsErr = -4188, // Received self IDs are bad.
-
- //zzz Do we own these next ID numbers?
- cableVoltageTooLowErr = -4190, // Cable power below device's minimum voltage
- cablePowerInsufficientErr = -4191 // Can't grant power request at this time
- };
-
- // end - Put in Errors.h
-
- #if PRAGMA_ALIGN_SUPPORTED
- #pragma options align=reset
- #endif
-
- #if PRAGMA_IMPORT_SUPPORTED
- #pragma import off
- #endif
-
- #ifdef __cplusplus
- }
- #endif
-
- #endif /* __FIREWIRE__ */
-